Fix incorrect region

Bug: 388426025
Test: UI verification
Flag: com.android.settings.flags.regional_preferences_api_enabled
Change-Id: I62df2e3d2111ee45aece7a6af81edc561fe72b07
This commit is contained in:
Allen Su
2025-01-22 11:00:24 +00:00
parent eb927665a3
commit 9e09f00956
4 changed files with 9 additions and 7 deletions

View File

@@ -111,7 +111,7 @@ public class LocalePickerWithRegionActivity extends SettingsBaseActivity
@Override
public void onLocaleSelected(LocaleStore.LocaleInfo locale) {
if (Flags.regionalPreferencesApiEnabled()) {
if (sameLanguageAndScript(locale.getLocale(), Locale.getDefault())) {
if (sameLanguageAndScript(locale.getLocale(), LocaleList.getDefault().get(0))) {
Bundle args = new Bundle();
args.putInt(ARG_DIALOG_TYPE, DIALOG_CHANGE_LOCALE_REGION);
args.putSerializable(ARG_TARGET_LOCALE, locale);