aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt4
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)
}