Bug 968172 - Ensure consistent locale string on onLocaleReady() calls (r=rnewman)
authorLucas Rocha <lucasr@mozilla.com>
Fri, 21 Feb 2014 10:47:44 +0000
changeset 170377 e0a8e36904bf6493383a04e61cf6b2dc4ef1229b
parent 170376 0304dd8dc1d96f9d4404f035085aab49b73485f2
child 170378 6d779ac440d6db3ccd9d7297cd2b2a93af059686
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersrnewman
bugs968172
milestone30.0a1
Bug 968172 - Ensure consistent locale string on onLocaleReady() calls (r=rnewman)
mobile/android/base/LocaleManager.java
--- a/mobile/android/base/LocaleManager.java
+++ b/mobile/android/base/LocaleManager.java
@@ -230,21 +230,21 @@ public class LocaleManager {
         final long t1 = android.os.SystemClock.uptimeMillis();
         final String localeCode = getPersistedLocale();
         if (localeCode == null) {
             return null;
         }
 
         // Note that we don't tell Gecko about this. We notify Gecko when the
         // locale is set, not when we update Java.
-        updateLocale(localeCode);
+        final String resultant = updateLocale(localeCode);
 
         final long t2 = android.os.SystemClock.uptimeMillis();
         Log.i(LOG_TAG, "Locale read and update took: " + (t2 - t1) + "ms.");
-        return localeCode;
+        return resultant;
     }
 
     /**
      * Returns the set locale if it changed.
      *
      * Always persists and notifies Gecko.
      */
     public static String setSelectedLocale(String localeCode) {