Backed out changeset f20d3ef82554 (bug 1045053) for Android rc* test failures
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 02 Oct 2014 10:29:48 +0200
changeset 231679 35490bc74c7e7daf440aafac47ae0539dc709de0
parent 231678 be492ccdee041258e829c2b933568cee83144358
child 231680 01a525d9c6c2242c5a0d031a885df2eb6c2ecbe5
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
bugs1045053
milestone35.0a1
backs outf20d3ef8255464424b8f15f7a9b0ffdff71b63ba
Backed out changeset f20d3ef82554 (bug 1045053) for Android rc* test failures
mobile/android/base/BrowserLocaleManager.java
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/BrowserLocaleManager.java
+++ b/mobile/android/base/BrowserLocaleManager.java
@@ -324,19 +324,16 @@ public class BrowserLocaleManager implem
         config.locale = locale;
         res.updateConfiguration(config, null);
     }
 
     private SharedPreferences getSharedPreferences(Context context) {
         return GeckoSharedPrefs.forApp(context);
     }
 
-    /**
-     * @return the persisted locale in Java format: "en_US".
-     */
     private String getPersistedLocale(Context context) {
         final SharedPreferences settings = getSharedPreferences(context);
         final String locale = settings.getString(PREF_LOCALE, "");
 
         if ("".equals(locale)) {
             return null;
         }
         return locale;
@@ -361,35 +358,29 @@ public class BrowserLocaleManager implem
     }
 
     /**
      * Updates the Java locale and the Android configuration.
      *
      * Returns the persisted locale if it differed.
      *
      * Does not notify Gecko.
-     *
-     * @param localeCode a locale string in Java format: "en_US".
-     * @return if it differed, a locale string in Java format: "en_US".
      */
     private String updateLocale(Context context, String localeCode) {
         // Fast path.
         final Locale defaultLocale = Locale.getDefault();
         if (defaultLocale.toString().equals(localeCode)) {
             return null;
         }
 
         final Locale locale = parseLocaleCode(localeCode);
 
         return updateLocale(context, locale);
     }
 
-    /**
-     * @return the Java locale string: e.g., "en_US".
-     */
     private String updateLocale(Context context, final Locale locale) {
         // Fast path.
         if (Locale.getDefault().equals(locale)) {
             return null;
         }
 
         Locale.setDefault(locale);
         currentLocale = locale;
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1312,17 +1312,16 @@ public abstract class GeckoApp
                 editor.apply();
 
                 // The lifecycle of mHealthRecorder is "shortly after onCreate"
                 // through "onDestroy" -- essentially the same as the lifecycle
                 // of the activity itself.
                 final String profilePath = getProfile().getDir().getAbsolutePath();
                 final EventDispatcher dispatcher = EventDispatcher.getInstance();
 
-                // Both of these are Java-format locale strings: "en_US", not "en-US".
                 final String osLocale = Locale.getDefault().toString();
                 String appLocale = localeManager.getAndApplyPersistedLocale(GeckoApp.this);
                 Log.d(LOGTAG, "OS locale is " + osLocale + ", app locale is " + appLocale);
 
                 if (appLocale == null) {
                     appLocale = osLocale;
                 }