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 183052 b0819a1afd15
parent 183051 7cc9eb361a9d
child 183053 cb8d6f98fbc2
push id6787
push userrnewman@mozilla.com
push date2014-05-14 03:57 +0000
treeherderfx-team@2d5ab443d3c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs917480
milestone32.0a1
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));