Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f040868 authored by Tom Hsu's avatar Tom Hsu Committed by Android (Google) Code Review
Browse files

Merge "[Regional Preference] Fix subtitle overlap"

parents 37ac2031 5c7c53d0
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -563,6 +563,18 @@ public class LocaleStore {
        String id = locale.toLanguageTag();
        LocaleInfo result;
        if (!sLocaleCache.containsKey(id)) {
            // Locale preferences can modify the language tag to current system languages, so we
            // need to check the input locale without extra u extension except numbering system.
            Locale filteredLocale = new Locale.Builder()
                    .setLocale(locale.stripExtensions())
                    .setUnicodeLocaleKeyword("nu", locale.getUnicodeLocaleType("nu"))
                    .build();
            if (sLocaleCache.containsKey(filteredLocale.toLanguageTag())) {
                result = new LocaleInfo(locale);
                // This locale is included in supported locales, so set translated be true here.
                result.mIsTranslated = true;
                return result;
            }
            result = new LocaleInfo(locale);
            sLocaleCache.put(id, result);
        } else {