1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-08 20:12:39 +01:00

Fix misc lintRelease problems

This commit is contained in:
Allan Wang 2018-09-27 19:19:15 -04:00
parent 38e77e52e0
commit d3e11bbaaf
4 changed files with 7 additions and 7 deletions

View File

@ -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() {

View File

@ -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()

View File

@ -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
}
}

View File

@ -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)
}