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

Commit 6896dfa9 authored by Adam Lesinski's avatar Adam Lesinski Committed by The Android Automerger
Browse files

Use app's best locale if they override LocaleList

App's can technically override their configuration's Locale,
which means we must choose the overriden locale as the best,
and therefore set the LocaleList.setDefault() with that locale.

Bug:28953437
Change-Id: I4b301fcd6bc426e37bb389d3a6f2b4a3c69ac33a
parent a0f0424d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -5007,8 +5007,11 @@ public final class ActivityThread {
                return;
            }
        }
        throw new AssertionError("chosen locale " + bestLocale + " must be present in LocaleList: "
                + newLocaleList.toLanguageTags());

        // The app may have overridden the LocaleList with its own Locale
        // (not present in the available list). Push the chosen Locale
        // to the front of the list.
        LocaleList.setDefault(new LocaleList(bestLocale, newLocaleList));
    }

    private void handleBindApplication(AppBindData data) {