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

Commit fdb30929 authored by Zoey Chen's avatar Zoey Chen Committed by Android (Google) Code Review
Browse files

Merge "[Settings] Only add the selected locale to localelist" into main

parents 90213e00 824a153f
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -262,13 +262,10 @@ public abstract class LocalePickerBaseListPreferenceController extends
        boolean shouldShowLocaleEditor = shouldShowLocaleEditor(localeInfo);
        if (shouldShowLocaleEditor) {
            List<LocaleStore.LocaleInfo> feedItemList = getUserLocaleList();
            for (LocaleStore.LocaleInfo locale : mLocaleList) {
                feedItemList.add(locale);
            }
            feedItemList.add(localeInfo);
            LocaleList localeList = new LocaleList(feedItemList.stream()
                    .map(LocaleStore.LocaleInfo::getLocale)
                    .toArray(Locale[]::new));

            LocaleList.setDefault(localeList);
            LocalePicker.updateLocales(localeList);
            mMetricsFeatureProvider.action(mContext, SettingsEnums.ACTION_ADD_LANGUAGE);