For #4438: Fix crash when opening any URL from URL bar w/ long press

This commit is contained in:
Yeon Taek Jeong 2019-08-05 14:53:13 -07:00 committed by Emily Kager
parent 969d17b4a9
commit a8526a0606
2 changed files with 2 additions and 1 deletions

View File

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

View File

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