1
0
Fork 0

Fix PIP toolbar

master
Tiger Oakes 2020-06-15 09:33:06 -07:00 committed by Emily Kager
parent d3d5c8934f
commit d81aa62683
1 changed files with 7 additions and 5 deletions

View File

@ -706,11 +706,6 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
@CallSuper @CallSuper
final override fun onPause() { final override fun onPause() {
super.onPause() super.onPause()
val session = requireComponents.core.store.state.findTabOrCustomTabOrSelectedTab(customTabSessionId)
// If we didn't enter PiP, exit full screen on pause
if (session?.content?.pictureInPictureEnabled == false && fullScreenFeature.onBackPressed()) {
fullScreenChanged(false)
}
if (findNavController().currentDestination?.id != R.id.searchFragment) { if (findNavController().currentDestination?.id != R.id.searchFragment) {
view?.hideKeyboard() view?.hideKeyboard()
} }
@ -720,6 +715,13 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
override fun onStop() { override fun onStop() {
super.onStop() super.onStop()
initUIJob?.cancel() initUIJob?.cancel()
requireComponents.core.store.state.findTabOrCustomTabOrSelectedTab(customTabSessionId)?.let { session ->
// If we didn't enter PiP, exit full screen on stop
if (!session.content.pictureInPictureEnabled && fullScreenFeature.onBackPressed()) {
fullScreenChanged(false)
}
}
} }
@CallSuper @CallSuper