diff options
author | Allan Wang <me@allanwang.ca> | 2018-09-27 19:19:15 -0400 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2018-09-27 19:19:15 -0400 |
commit | d3e11bbaaf497682f2e62a20b2866e2b05b8ba16 (patch) | |
tree | 23eef66da162b4c082b98ff6b04dda1a6785b82b /app/src/main | |
parent | 38e77e52e023f8fa5b595a7bd81f12d646fe77a7 (diff) | |
download | frost-d3e11bbaaf497682f2e62a20b2866e2b05b8ba16.tar.gz frost-d3e11bbaaf497682f2e62a20b2866e2b05b8ba16.tar.bz2 frost-d3e11bbaaf497682f2e62a20b2866e2b05b8ba16.zip |
Fix misc lintRelease problems
Diffstat (limited to 'app/src/main')
4 files changed, 7 insertions, 7 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt index 9ed51652..1ed71622 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -352,7 +352,7 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, if (requestCode == ACTIVITY_SETTINGS) { if (resultCode and REQUEST_RESTART_APPLICATION > 0) { //completely restart application L.d { "Restart Application Requested" } - val intent = packageManager.getLaunchIntentForPackage(packageName) + val intent = packageManager.getLaunchIntentForPackage(packageName)!! Intent.makeRestartActivityTask(intent.component) Runtime.getRuntime().exit(0) return @@ -378,7 +378,7 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, override fun onRestoreInstanceState(savedInstanceState: Bundle) { super.onRestoreInstanceState(savedInstanceState) adapter.forcedFallbacks.clear() - adapter.forcedFallbacks.addAll(savedInstanceState.getStringArrayList(STATE_FORCE_FALLBACK)) + adapter.forcedFallbacks.addAll(savedInstanceState.getStringArrayList(STATE_FORCE_FALLBACK) ?: emptyList()) } override fun onResume() { diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt index 77ca37f3..6b5b2021 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt @@ -15,9 +15,9 @@ import java.util.concurrent.TimeUnit class MainActivity : BaseMainActivity() { - override val fragmentSubject = PublishSubject.create<Int>()!! + override val fragmentSubject = PublishSubject.create<Int>() var lastPosition = -1 - val headerBadgeObservable = PublishSubject.create<String>()!! + val headerBadgeObservable = PublishSubject.create<String>() override fun onNestedCreate(savedInstanceState: Bundle?) { setupTabs() diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt index 237780b8..7561dc88 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt @@ -47,7 +47,7 @@ class SettingsActivity : KPrefActivity() { ACTIVITY_REQUEST_DEBUG -> { val url = data?.extras?.getString(DebugActivity.RESULT_URL) if (resultCode == Activity.RESULT_OK && url?.isNotBlank() == true) - sendDebug(url, data.extras.getString(DebugActivity.RESULT_BODY)) + sendDebug(url, data.getStringExtra(DebugActivity.RESULT_BODY)) return } } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt index 3fd5ee7b..b2ccaea2 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt @@ -104,11 +104,11 @@ object FrostRunnable { } fun propagate(context: Context, intent: Intent?) { - intent?.extras ?: return + val extras = intent?.extras ?: return val command = FrostRequestCommands[intent] ?: return intent.removeExtra(ARG_COMMAND) // reset L.d { "Propagating command ${command.name}" } - val builder = command.propagate(intent.extras) + val builder = command.propagate(extras) schedule(context, command, builder) } |