[fenix] For https://github.com/mozilla-mobile/fenix/issues/4438: Fix crash when opening any URL from URL bar w/ long press

pull/600/head
Yeon Taek Jeong 5 years ago committed by Emily Kager
parent e904bd867e
commit 772fcc8f5d

@ -133,6 +133,7 @@ open class HomeActivity : AppCompatActivity(), ShareFragment.TabsSharedCallback
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
navHost.navController.popBackStack(R.id.homeFragment, false)
handleCrashIfNecessary(intent)
handleOpenedFromExternalSourceIfNecessary(intent)
}

@ -80,7 +80,7 @@ class IntentReceiverActivity : Activity() {
} else {
if (!intent.getBooleanExtra(NotificationManager.RECEIVE_TABS_TAG, false)) {
intent.flags =
Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
}
true
}

Loading…
Cancel
Save