Commit c3ca02ee authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃 Committed by brizental
Browse files

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

BB 43401: Replace Locale constructors with Locale.Builder.
parent 5c0d3c31
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -634,7 +634,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;
    }
@@ -1511,7 +1512,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);
  }