summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2016-05-26 01:11:02 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-05-26 01:11:03 +0000
commitfbf3a0964a458508f834bffd18198394037bb5c1 (patch)
tree09158470510f5b8b9c66fbd04567196ef281195c
parentbc983c443139c7b4605f98d56bd9ad7652a9938b (diff)
parent27d301667be46fd5038e97f435c2d9f133894617 (diff)
Merge "Use app's best locale if they override LocaleList" into nyc-dev
-rw-r--r--core/java/android/app/ActivityThread.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 30753c1632ff..7198146bee0f 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -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) {