Merge "Fix System language option missing and locale region missing issue"

This commit is contained in:
TreeHugger Robot
2022-03-23 18:16:07 +00:00
committed by Android (Google) Code Review

View File

@@ -62,7 +62,7 @@ public class AppLocalePickerActivity extends SettingsBaseActivity
// Create Locale picker part.
final LocalePickerWithRegion selector = LocalePickerWithRegion.createLanguagePicker(
this, AppLocalePickerActivity.this, false /* translate only */);
this, AppLocalePickerActivity.this, false /* translate only */, mPackageName);
// LocalePickerWithRegion use android.app.ListFragment. Thus, it can not user
// getSupportFragmentManager() to add this into container.
getFragmentManager()
@@ -100,7 +100,7 @@ public class AppLocalePickerActivity extends SettingsBaseActivity
if (localeInfo == null || localeInfo.getLocale() == null || localeInfo.isSystemLocale()) {
setAppDefaultLocale("");
} else {
setAppDefaultLocale(localeInfo.getLocale().getLanguage());
setAppDefaultLocale(localeInfo.getLocale().toLanguageTag());
}
finish();
}