diff options
| author | 2024-01-05 18:55:11 +0000 | |
|---|---|---|
| committer | 2024-01-05 18:55:11 +0000 | |
| commit | ea001d2637214a526e34e2a8dce0c460dc27ca8b (patch) | |
| tree | cfa23753981ea2669214dc6dadfa0d1609ae5e3d | |
| parent | b6c8e08e5d4d2dcb4484ca325e42493fd497b0db (diff) | |
| parent | 801c1f814d622bb8ae94caece8214e1cac97c154 (diff) | |
Merge "Stop getting locale config overrides" into main
| -rw-r--r-- | core/java/android/app/ContextImpl.java | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java index 705b2ee214f7..edeec77d48fe 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -3485,20 +3485,7 @@ class ContextImpl extends Context { // 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); } } |