From eb45b37207c0fc71e591aa37c70d3467eb533d28 Mon Sep 17 00:00:00 2001 From: Mihai Eduard Badea Date: Mon, 22 Jun 2020 12:19:37 +0300 Subject: [PATCH] For issue #10727 - Hide saved logins details Removed the clearFlags call from the HomeActivity that was causing this issue and removed the now redundant call to update the flag from the redirectToReAuth method --- app/src/main/java/org/mozilla/fenix/HomeActivity.kt | 2 -- app/src/main/java/org/mozilla/fenix/ext/Fragment.kt | 2 -- 2 files changed, 4 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt index b23ccea97..7f9c5282e 100644 --- a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt @@ -196,8 +196,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity() { final override fun onPause() { if (settings().lastKnownMode.isPrivate) { window.addFlags(WindowManager.LayoutParams.FLAG_SECURE) - } else { - window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE) } super.onPause() diff --git a/app/src/main/java/org/mozilla/fenix/ext/Fragment.kt b/app/src/main/java/org/mozilla/fenix/ext/Fragment.kt index 2b0a81d86..7da50f968 100644 --- a/app/src/main/java/org/mozilla/fenix/ext/Fragment.kt +++ b/app/src/main/java/org/mozilla/fenix/ext/Fragment.kt @@ -57,14 +57,12 @@ fun Fragment.hideToolbar() { /** * Pops the backstack to force users to re-auth if they put the app in the background and return to it * while being inside the saved logins flow - * It also updates the FLAG_SECURE status for the activity's window * * Does nothing if the user is currently navigating to any of the [destinations] given as a parameter * */ fun Fragment.redirectToReAuth(destinations: List, currentDestination: Int?) { if (currentDestination !in destinations) { - activity?.let { it.checkAndUpdateScreenshotPermission(it.settings()) } findNavController().popBackStack(R.id.savedLoginsAuthFragment, false) } }