1
0
Fork 0

For #9887 - Respect screenshot setting when resetting window flags in logins

master
ekager 2020-04-14 10:20:12 -07:00 committed by Emily Kager
parent 06f1b6c992
commit aef827e607
2 changed files with 6 additions and 2 deletions

View File

@ -32,7 +32,9 @@ import kotlinx.coroutines.withContext
import org.mozilla.fenix.R
import org.mozilla.fenix.components.FenixSnackbar
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.checkAndUpdateScreenshotPermission
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.ext.showToolbar
/**
@ -50,7 +52,7 @@ class SavedLoginSiteInfoFragment : Fragment(R.layout.fragment_saved_login_site_i
override fun onPause() {
// If we pause this fragment, we want to pop users back to reauth
if (findNavController().currentDestination?.id != R.id.savedLoginsFragment) {
activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
activity?.let { it.checkAndUpdateScreenshotPermission(it.settings()) }
findNavController().popBackStack(R.id.loginsFragment, false)
}
super.onPause()

View File

@ -33,7 +33,9 @@ import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.StoreProvider
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.checkAndUpdateScreenshotPermission
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.ext.showToolbar
import org.mozilla.fenix.settings.SupportUtils
@ -110,7 +112,7 @@ class SavedLoginsFragment : Fragment() {
*/
override fun onPause() {
if (findNavController().currentDestination?.id != R.id.savedLoginSiteInfoFragment) {
activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
activity?.let { it.checkAndUpdateScreenshotPermission(it.settings()) }
findNavController().popBackStack(R.id.loginsFragment, false)
}
super.onPause()