diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 635bd75c44bdd..0691fb34e6a4d 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -5005,8 +5005,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) {