fix RecentlyNonNull/Nullable warnings

This commit is contained in:
Conny Duck 2018-09-22 21:11:18 +02:00
parent e4a318db12
commit 95e507d489
3 changed files with 5 additions and 5 deletions

View File

@ -78,7 +78,7 @@ class LoginActivity : AppCompatActivity(), Injectable {
setContentView(R.layout.activity_login)
if (savedInstanceState != null) {
domain = savedInstanceState.getString(DOMAIN)
domain = savedInstanceState.getString(DOMAIN)!!
clientId = savedInstanceState.getString(CLIENT_ID)
clientSecret = savedInstanceState.getString(CLIENT_SECRET)
}
@ -225,7 +225,7 @@ class LoginActivity : AppCompatActivity(), Injectable {
val code = uri.getQueryParameter("code")
val error = uri.getQueryParameter("error")
domain = preferences.getString(DOMAIN, "")
domain = preferences.getString(DOMAIN, "")!!
if (code != null && domain.isNotEmpty()) {
/* During the redirect roundtrip this Activity usually dies, which wipes out the

View File

@ -139,7 +139,7 @@ class SendStatusBroadcastReceiver : BroadcastReceiver() {
private fun getReplyMessage(intent: Intent): CharSequence {
val remoteInput = RemoteInput.getResultsFromIntent(intent)
return remoteInput.getCharSequence(NotificationHelper.KEY_REPLY)
return remoteInput.getCharSequence(NotificationHelper.KEY_REPLY, "")
}
}

View File

@ -4,8 +4,8 @@ import android.text.TextPaint
import android.text.style.ClickableSpan
abstract class ClickableSpanNoUnderline : ClickableSpan() {
override fun updateDrawState(ds: TextPaint?) {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds?.isUnderlineText = false
ds.isUnderlineText = false
}
}