Merge "Stop getting locale config overrides" into main
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 705b2ee..edeec77 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -3485,20 +3485,7 @@
// only do this if the user already has more than one preferred locale
if (android.content.res.Flags.defaultLocale()
&& r.getConfiguration().getLocales().size() > 1) {
- LocaleConfig lc;
- if (getUserId() < 0) {
- lc = LocaleConfig.fromContextIgnoringOverride(this);
- } else {
- // This is needed because the app might have locale config overrides that need
- // to be read from disk in order for resources to correctly choose which values
- // to load.
- StrictMode.ThreadPolicy policy = StrictMode.allowThreadDiskReads();
- try {
- lc = new LocaleConfig(this);
- } finally {
- StrictMode.setThreadPolicy(policy);
- }
- }
+ LocaleConfig lc = LocaleConfig.fromContextIgnoringOverride(this);
mResourcesManager.setLocaleConfig(lc);
}
}