[Panlingual] Make error message generic.

Bug: 226032712
Test: local
Change-Id: Ibfdc3d5807df4f8e5f1aa3fd37a8f361624c4129
This commit is contained in:
tom hsu
2022-04-13 19:16:03 +08:00
parent d3c3a2fdff
commit ddbff186f3
2 changed files with 2 additions and 9 deletions

View File

@@ -208,13 +208,9 @@ public class AppLocaleDetails extends SettingsPreferenceFragment {
LocaleList packageLocaleList = getPackageLocales();
String[] assetLocaleList = getAssetLocales();
// TODO add apended url string, "Learn more", to these both sentenses.
if (packageLocaleList == null && assetLocaleList.length == 0) {
// There is no locale info from PackageManager amd AssetManager.
if ((packageLocaleList != null && packageLocaleList.isEmpty())
|| (packageLocaleList == null && assetLocaleList.length == 0)) {
return R.string.desc_no_available_supported_locale;
} else if (packageLocaleList != null && packageLocaleList.isEmpty()) {
// LocaleConfig is empty, and this means only allow user modify language
// by the application.
return R.string.desc_disallow_locale_change_in_settings;
}
return -1;
}