Commit 7a058cbb authored by Alex Catarineu's avatar Alex Catarineu Committed by Richard Pospesel
Browse files

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.
parent 12b99899
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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
        );