For #20098: Allow PB PiP video screenshots

...when `Allow screenshots in private browsing` is enabled
upstream-sync
codrut.topliceanu 3 years ago committed by mergify[bot]
parent c45703db07
commit f2862eef6a

@ -278,14 +278,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
override fun onResume() {
super.onResume()
// Even if screenshots are allowed, we hide private content in the recents screen in onPause
// only when we are in private mode, so in onResume we should go back to setting these flags
// with the user screenshot setting only when we are in private mode.
// See https://github.com/mozilla-mobile/fenix/issues/11153
if (settings().lastKnownMode == BrowsingMode.Private) {
updateSecureWindowFlags(settings().lastKnownMode)
}
// Diagnostic breadcrumb for "Display already aquired" crash:
// https://github.com/mozilla-mobile/android-components/issues/7960
breadcrumb(
@ -339,13 +331,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
settings().shouldReturnToBrowser =
components.core.store.state.getNormalOrPrivateTabs(private = false).isNotEmpty()
// Even if screenshots are allowed, we want to hide private content in the recents screen
// only when we are in private mode
// See https://github.com/mozilla-mobile/fenix/issues/11153
if (settings().lastKnownMode.isPrivate) {
window.addFlags(FLAG_SECURE)
}
lifecycleScope.launch(IO) {
components.core.bookmarksStorage.getTree(BookmarkRoot.Root.id, true)?.let {
val desktopRootNode = DesktopFolders(

Loading…
Cancel
Save