| Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| index e5196e47ed1c1e42483d48132c373a299dbba568..5a59ce7c7bf54715e17c7f679bc000589202032c 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| @@ -360,7 +360,7 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
|
| // Do not use directly, call isDestroyed() instead.
|
| private boolean mIsDestroyed = false;
|
|
|
| - private static String sCurrentLocales = "";
|
| + private static String sCurrentLocale = "";
|
|
|
| private static final class AwContentsDestroyRunnable implements Runnable {
|
| private final long mNativeAwContents;
|
| @@ -694,11 +694,7 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
|
|
|
| @Override
|
| public void onConfigurationChanged(Configuration configuration) {
|
| - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
| - setLocale(LocaleUtils.toLanguageTags(configuration.getLocales()));
|
| - } else {
|
| - setLocale(LocaleUtils.toLanguageTag(configuration.locale));
|
| - }
|
| + setLocale(LocaleUtils.toLanguageTag(configuration.locale));
|
| mSettings.updateAcceptLanguages();
|
| }
|
| };
|
| @@ -1025,12 +1021,11 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
|
| return wrapper;
|
| }
|
|
|
| - // Deal with a string that represents either a single locale or a locale list.
|
| @VisibleForTesting
|
| - public static void setLocale(String locales) {
|
| - if (!sCurrentLocales.equals(locales)) {
|
| - sCurrentLocales = locales;
|
| - nativeSetLocale(sCurrentLocales);
|
| + public static void setLocale(String locale) {
|
| + if (!sCurrentLocale.equals(locale)) {
|
| + sCurrentLocale = locale;
|
| + nativeSetLocale(sCurrentLocale);
|
| }
|
| }
|
|
|
|
|