Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c117a89a authored by Calvin Pan's avatar Calvin Pan
Browse files

Fix System language option missing and locale region missing issue

- Taking app package name into LocalePickerWithRegion
- Using toLanguageTag() instead of getLanguage() to prevent locale
 region missing

Bug: 226278910
Bug: 226280740
Change-Id: Ieac42616192065abc0cf82db023e4e50f1ca562d
Test: To be verified
parent 22f532e6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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()
@@ -101,7 +101,7 @@ public class AppLocalePickerActivity extends SettingsBaseActivity
        if (localeInfo == null || localeInfo.getLocale() == null) {
            setAppDefaultLocale("");
        } else {
            setAppDefaultLocale(localeInfo.getLocale().getLanguage());
            setAppDefaultLocale(localeInfo.getLocale().toLanguageTag());
        }
        finish();
    }