| 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 82b2c8fc6667cd7ccc7cd96c58bfaef8d76ab595..93d4f3234a41de2c016d602a5b5ee23c5a830304 100644
|
| --- a/base/android/java/src/org/chromium/base/LocaleUtils.java
|
| +++ b/base/android/java/src/org/chromium/base/LocaleUtils.java
|
| @@ -17,12 +17,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();
|
|
|
| @@ -41,6 +40,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.
|
| */
|
|
|