For #3073 'Open in Firefox Preview' no longer opens in app

Saving and restoring the custom tab session ID fixed one problem while causing another. I added code to only restore the ID if the session has a customTabConfig associated.
nightly-build-test
Colin Lee 5 years ago committed by Emily Kager
parent 62473e5e86
commit 04bbeb5ae6

@ -576,7 +576,11 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
override fun onViewStateRestored(savedInstanceState: Bundle?) {
super.onViewStateRestored(savedInstanceState)
customTabSessionId = savedInstanceState?.getString(KEY_CUSTOM_TAB_SESSION_ID)
savedInstanceState?.getString(KEY_CUSTOM_TAB_SESSION_ID)?.let {
if (requireComponents.core.sessionManager.findSessionById(it)?.customTabConfig != null) {
customTabSessionId = it
}
}
}
override fun onStop() {

Loading…
Cancel
Save