Commit a3ab996f authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

fixup! BB 42562: Normalized the Accepted Languages on Android.

BB 43401: Replace Locale constructors with Locale.Builder.
parent 28e0365d
Loading
Loading
Loading
Loading
+3 −2
Changes for mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -638,7 +638,8 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
      for (String tag : locales) {
        Locale locale = Locale.forLanguageTag(tag);
        getSettings().mSupportedLocales.put(locale, locale);
        getSettings().mSupportedLocales.put(new Locale(locale.getLanguage()), locale);
        Locale lang = new Locale.Builder().setLanguage(locale.getLanguage()).build();
        getSettings().mSupportedLocales.put(lang, locale);
      }
      return this;
    }
@@ -1490,7 +1491,7 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
    if (mSupportedLocales.containsKey(exact)) {
      return exact;
    }
    Locale fallback = new Locale(exact.getLanguage());
    Locale fallback = new Locale.Builder().setLanguage(exact.getLanguage()).build();
    return mSupportedLocales.get(fallback);
  }