[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.0-1] fixup! Modify UI/UX



Title: GitLab

Dan Ballard pushed to branch firefox-android-115.2.1-13.0-1 at The Tor Project / Applications / firefox-android

Commits:

  • 3b34325f
    by clairehurst at 2023-10-05T17:45:17-06:00
    fixup! Modify UI/UX
    
    Bug 42156: Screenshot allowing still blocks homescreen (android)
    

1 changed file:

Changes:

  • fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
    ... ... @@ -14,6 +14,7 @@ import android.os.Bundle
    14 14
     import android.os.Handler
    
    15 15
     import android.os.Looper
    
    16 16
     import android.view.LayoutInflater
    
    17
    +import android.view.WindowManager
    
    17 18
     import android.widget.Toast
    
    18 19
     import androidx.annotation.VisibleForTesting
    
    19 20
     import androidx.appcompat.app.AlertDialog
    
    ... ... @@ -471,7 +472,16 @@ class SettingsFragment : PreferenceFragmentCompat() {
    471 472
                 requirePreference<DefaultBrowserPreference>(R.string.pref_key_make_default_browser)
    
    472 473
     
    
    473 474
             requirePreference<Preference>(R.string.pref_key_allow_screenshots_in_private_mode).apply {
    
    474
    -            onPreferenceChangeListener = SharedPreferenceUpdater()
    
    475
    +            onPreferenceChangeListener = object : SharedPreferenceUpdater() {
    
    476
    +                override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
    
    477
    +                    if (newValue == false) {
    
    478
    +                        activity?.window?.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
    
    479
    +                    } else {
    
    480
    +                        activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
    
    481
    +                    }
    
    482
    +                    return super.onPreferenceChange(preference, newValue)
    
    483
    +                }
    
    484
    +            }
    
    475 485
             }
    
    476 486
     
    
    477 487
             preferencePrioritizeOnions?.setOnPreferenceChangeListener<Boolean> { preference, newValue ->
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits