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 35d04a9b73b8e337f8469420e4141343810b2ef3..5c26e7a50c28618ad009b7499bd1954b44b4541c 100644 |
--- a/base/android/java/src/org/chromium/base/LocaleUtils.java |
+++ b/base/android/java/src/org/chromium/base/LocaleUtils.java |
@@ -19,22 +19,13 @@ public class LocaleUtils { |
} |
/** |
- * @return The string for the given 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. |
*/ |
public static String getLocale(Locale locale) { |
- String language = getLanguage(locale); |
- String country = locale.getCountry(); |
- |
- return country.isEmpty() ? language : language + "-" + country; |
- } |
- |
- /** |
- * @return The language for the given locale, translating Android deprecated languages codes |
- * into modern ones used by Chromium. |
- */ |
- public static String getLanguage(Locale locale) { |
String language = locale.getLanguage(); |
+ String country = locale.getCountry(); |
// Android uses deprecated lanuages codes for Hebrew and Indonesian but Chromium uses the |
// updated codes. Also, Android uses "tl" while Chromium uses "fil" for Tagalog/Filipino. |
@@ -47,12 +38,12 @@ public class LocaleUtils { |
} else if ("tl".equals(language)) { |
language = "fil"; |
} |
- return language; |
+ return country.isEmpty() ? language : language + "-" + country; |
} |
/** |
- * @return The default locale, translating Android deprecated language codes into the modern |
- * ones used by Chromium. |
+ * @return the default locale, translating Android deprecated |
+ * language codes into the modern ones used by Chromium. |
*/ |
@CalledByNative |
public static String getDefaultLocale() { |
@@ -60,7 +51,8 @@ public class LocaleUtils { |
} |
/** |
- * @return The default country code set during install. |
+ * Get the default country code set during install. |
+ * @return country code. |
*/ |
@CalledByNative |
private static String getDefaultCountryCode() { |