[tbb-commits] [tor-browser/tor-browser-91.6.0esr-11.5-1] Bug 30605: Honor privacy.spoof_english in Android

richard at torproject.org richard at torproject.org
Wed Feb 9 13:48:14 UTC 2022


commit c744dde74babf45da94879f326e40bf6fe6b6285
Author: Alex Catarineu <acat at torproject.org>
Date:   Fri Oct 16 10:45:17 2020 +0200

    Bug 30605: Honor privacy.spoof_english in Android
    
    This checks `privacy.spoof_english` whenever `setLocales` is
    called from Fenix side and sets `intl.accept_languages`
    accordingly.
---
 mobile/android/components/geckoview/GeckoViewStartup.jsm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mobile/android/components/geckoview/GeckoViewStartup.jsm b/mobile/android/components/geckoview/GeckoViewStartup.jsm
index 055c3da638e1..2bf394f2cb3b 100644
--- a/mobile/android/components/geckoview/GeckoViewStartup.jsm
+++ b/mobile/android/components/geckoview/GeckoViewStartup.jsm
@@ -17,6 +17,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
   EventDispatcher: "resource://gre/modules/Messaging.jsm",
   Preferences: "resource://gre/modules/Preferences.jsm",
   Services: "resource://gre/modules/Services.jsm",
+  RFPHelper: "resource://gre/modules/RFPHelper.jsm",
 });
 
 const { debug, warn } = GeckoViewUtils.initLogging("Startup");
@@ -255,6 +256,10 @@ class GeckoViewStartup {
         if (aData.requestedLocales) {
           Services.locale.requestedLocales = aData.requestedLocales;
         }
+        RFPHelper._handleSpoofEnglishChanged();
+        if (Services.prefs.getIntPref("privacy.spoof_english", 0) === 2) {
+          break;
+        }
         const pls = Cc["@mozilla.org/pref-localizedstring;1"].createInstance(
           Ci.nsIPrefLocalizedString
         );





More information about the tbb-commits mailing list