| 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 31d4127340c1ac2408e1871160b1ea3239307320..4f97d3a25c74e8a9bb4c29b936ee9abcf942639c 100644
|
| --- a/base/android/java/src/org/chromium/base/LocaleUtils.java
|
| +++ b/base/android/java/src/org/chromium/base/LocaleUtils.java
|
| @@ -20,6 +20,7 @@ public class LocaleUtils {
|
| * @return the default locale, translating Android deprecated
|
| * language codes into the modern ones used by Chromium.
|
| */
|
| + @CalledByNative
|
| public static String getDefaultLocale() {
|
| Locale locale = Locale.getDefault();
|
| String language = locale.getLanguage();
|
| @@ -38,4 +39,17 @@ public class LocaleUtils {
|
| }
|
| return country.isEmpty() ? language : language + "-" + country;
|
| }
|
| +
|
| + /**
|
| + * Get the default country code set during install.
|
| + * @return country code.
|
| + */
|
| + @CalledByNative
|
| + private static String getDefaultCountryCode() {
|
| + CommandLine commandLine = CommandLine.getInstance();
|
| + return commandLine.hasSwitch(BaseSwitches.DEFAULT_COUNTRY_CODE_AT_INSTALL) ?
|
| + commandLine.getSwitchValue(BaseSwitches.DEFAULT_COUNTRY_CODE_AT_INSTALL) :
|
| + Locale.getDefault().getCountry();
|
| + }
|
| +
|
| }
|
|
|