Loading core/java/android/content/res/ResourcesImpl.java +20 −35 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import android.annotation.PluralsRes; import android.annotation.RawRes; import android.annotation.StyleRes; import android.annotation.StyleableRes; import android.app.ResourcesManager; import android.compat.annotation.UnsupportedAppUsage; import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo.Config; Loading Loading @@ -430,7 +429,6 @@ public class ResourcesImpl { if ((configChanges & ActivityInfo.CONFIG_LOCALE) != 0) { if (locales.size() > 1) { String[] availableLocales; if (ResourcesManager.getInstance().getLocaleList().isEmpty()) { // The LocaleList has changed. We must query the AssetManager's // available Locales and figure out the best matching Locale in the new // LocaleList. Loading @@ -455,24 +453,11 @@ public class ResourcesImpl { } } } } else { selectedLocales = locales.getIntersection( ResourcesManager.getInstance().getLocaleList()); defaultLocale = ResourcesManager.getInstance() .getLocaleList().get(0).toLanguageTag(); } } } if (selectedLocales == null) { if (ResourcesManager.getInstance().getLocaleList().isEmpty()) { selectedLocales = new String[]{ adjustLanguageTag(locales.get(0).toLanguageTag())}; } else { selectedLocales = new String[locales.size()]; for (int i = 0; i < locales.size(); i++) { selectedLocales[i] = adjustLanguageTag(locales.get(i).toLanguageTag()); } } } if (mConfiguration.densityDpi != Configuration.DENSITY_DPI_UNDEFINED) { Loading Loading
core/java/android/content/res/ResourcesImpl.java +20 −35 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import android.annotation.PluralsRes; import android.annotation.RawRes; import android.annotation.StyleRes; import android.annotation.StyleableRes; import android.app.ResourcesManager; import android.compat.annotation.UnsupportedAppUsage; import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo.Config; Loading Loading @@ -430,7 +429,6 @@ public class ResourcesImpl { if ((configChanges & ActivityInfo.CONFIG_LOCALE) != 0) { if (locales.size() > 1) { String[] availableLocales; if (ResourcesManager.getInstance().getLocaleList().isEmpty()) { // The LocaleList has changed. We must query the AssetManager's // available Locales and figure out the best matching Locale in the new // LocaleList. Loading @@ -455,24 +453,11 @@ public class ResourcesImpl { } } } } else { selectedLocales = locales.getIntersection( ResourcesManager.getInstance().getLocaleList()); defaultLocale = ResourcesManager.getInstance() .getLocaleList().get(0).toLanguageTag(); } } } if (selectedLocales == null) { if (ResourcesManager.getInstance().getLocaleList().isEmpty()) { selectedLocales = new String[]{ adjustLanguageTag(locales.get(0).toLanguageTag())}; } else { selectedLocales = new String[locales.size()]; for (int i = 0; i < locales.size(); i++) { selectedLocales[i] = adjustLanguageTag(locales.get(i).toLanguageTag()); } } } if (mConfiguration.densityDpi != Configuration.DENSITY_DPI_UNDEFINED) { Loading