Index: base/android/java/src/org/chromium/base/LocaleUtils.java |
diff --git a/base/android/java/src/org/chromium/base/LocaleUtils.java b/base/android/java/src/org/chromium/base/LocaleUtils.java |
index 809fd6e9dabb39de02348865a2d5aa9e77427286..5c26e7a50c28618ad009b7499bd1954b44b4541c 100644 |
--- a/base/android/java/src/org/chromium/base/LocaleUtils.java |
+++ b/base/android/java/src/org/chromium/base/LocaleUtils.java |
@@ -19,12 +19,11 @@ public class LocaleUtils { |
} |
/** |
- * @return the default locale, translating Android deprecated |
- * language codes into the modern ones used by Chromium. |
+ * @return the string for the given locale, translating |
+ * Android deprecated language codes into the modern ones |
+ * used by Chromium. |
*/ |
- @CalledByNative |
- public static String getDefaultLocale() { |
- Locale locale = Locale.getDefault(); |
+ public static String getLocale(Locale locale) { |
String language = locale.getLanguage(); |
String country = locale.getCountry(); |
@@ -43,6 +42,15 @@ public class LocaleUtils { |
} |
/** |
+ * @return the default locale, translating Android deprecated |
+ * language codes into the modern ones used by Chromium. |
+ */ |
+ @CalledByNative |
+ public static String getDefaultLocale() { |
+ return getLocale(Locale.getDefault()); |
+ } |
+ |
+ /** |
* Get the default country code set during install. |
* @return country code. |
*/ |