Merge "Use app\'s best locale if they override LocaleList" into nyc-dev am: fbf3a0964a

am: ade0bce32a

* commit 'ade0bce32ae9dbacccf8d75695cda99b56a014f3':
  Use app's best locale if they override LocaleList

Change-Id: Ib573235d174892c714e6864d8f34ac3a909b2d1c
This commit is contained in:
Adam Lesinski
2016-05-26 02:18:05 +00:00
committed by android-build-merger

View File

@@ -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) {