Bug 917480 - Part 1: add basic locale preference handling to GeckoPreferences. r=liuche
authorRichard Newman <rnewman@mozilla.com>
Tue, 13 May 2014 20:50:27 -0700
changeset 183066 b0819a1afd15
parent 183065 7cc9eb361a9d
child 183067 cb8d6f98fbc2
push id26779
push usercbook@mozilla.com
push date2014-05-14 11:02 +0000
treeherdermozilla-central@5754fc307237 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs917480
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 917480 - Part 1: add basic locale preference handling to GeckoPreferences. r=liuche
mobile/android/base/preferences/GeckoPreferences.java
--- a/mobile/android/base/preferences/GeckoPreferences.java
+++ b/mobile/android/base/preferences/GeckoPreferences.java
@@ -90,16 +90,19 @@ public class GeckoPreferences
     private static final String PREFS_UPDATER_AUTODOWNLOAD = "app.update.autodownload";
     private static final String PREFS_GEO_REPORTING = "app.geo.reportdata";
     private static final String PREFS_GEO_LEARN_MORE = NON_PREF_PREFIX + "geo.learn_more";
     private static final String PREFS_HEALTHREPORT_LINK = NON_PREF_PREFIX + "healthreport.link";
     private static final String PREFS_DEVTOOLS_REMOTE_ENABLED = "devtools.debugger.remote-enabled";
     private static final String PREFS_DISPLAY_REFLOW_ON_ZOOM = "browser.zoom.reflowOnZoom";
     private static final String PREFS_SYNC = NON_PREF_PREFIX + "sync";
 
+    // This isn't a Gecko pref, even if it looks like one.
+    private static final String PREFS_BROWSER_LOCALE = "locale";
+
     public static final String PREFS_RESTORE_SESSION = NON_PREF_PREFIX + "restoreSession3";
 
     // These values are chosen to be distinct from other Activity constants.
     private static final int REQUEST_CODE_PREF_SCREEN = 5;
     private static final int RESULT_CODE_EXIT_SETTINGS = 6;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -450,16 +453,20 @@ public class GeckoPreferences
         if (TextUtils.isEmpty(key)) {
             return false;
         }
 
         if (key.startsWith(NON_PREF_PREFIX)) {
             return false;
         }
 
+        if (key.equals(PREFS_BROWSER_LOCALE)) {
+            return false;
+        }
+
         return true;
     }
 
     /**
      * Restore default search engines in Gecko and retrigger a search engine refresh.
      */
     protected void restoreDefaultSearchEngines() {
         GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("SearchEngines:RestoreDefaults", null));