From 4082b5eb9004f91447970063692fc99117161e15 Mon Sep 17 00:00:00 2001 From: "codrut.topliceanu" Date: Wed, 11 Aug 2021 11:33:00 +0300 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/20098: Allow PB PiP video screenshots ...when `Allow screenshots in private browsing` is enabled --- .../main/java/org/mozilla/fenix/HomeActivity.kt | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt index 3ec6bd978d..a72ca29e0e 100644 --- a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt @@ -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(