Loading res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -531,6 +531,7 @@ <string name="title_change_system_locale_region">Change region to %s ?</string> <!-- Message for asking to change system locale region or not. [CHAR LIMIT=50]--> <string name="body_change_system_locale_region">Your device will keep %s as a system language</string> <string name="top_intro_numbering_system_title">The digits used will be dependent on the numbering system</string> <!-- Regional Preferences begin --> <!-- The title of the menu entry of regional preferences. [CHAR LIMIT=50] --> res/xml/system_language_picker.xml +1 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,7 @@ <com.android.settingslib.widget.TopIntroPreference android:key="top_intro_region" android:title="@string/top_intro_region_title" settings:isPreferenceVisible="false"/> android:title="@string/top_intro_region_title"/> <PreferenceCategory android:key="system_language_suggested_category" Loading src/com/android/settings/localepicker/LocalePickerBaseListPreferenceController.java +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.settings.localepicker; import static com.android.settings.localepicker.LocaleListEditor.EXTRA_RESULT_LOCALE; import static com.android.settings.localepicker.RegionAndNumberingSystemPickerFragment.EXTRA_IS_NUMBERING_SYSTEM; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.os.LocaleList; Loading Loading @@ -178,7 +179,9 @@ public abstract class LocalePickerBaseListPreferenceController extends pref.setTitle(localeName); pref.setKey(locale.toString()); pref.setOnPreferenceClickListener(clickedPref -> { // TODO: b/390347399 - Should pop up a dialog when changes the region. switchFragment(locale); ((Activity) mContext).finish(); return true; }); mPreferences.put(locale.getId(), pref); Loading src/com/android/settings/localepicker/RegionAndNumberingSystemPickerFragment.java +2 −2 Original line number Diff line number Diff line Loading @@ -116,8 +116,8 @@ public class RegionAndNumberingSystemPickerFragment extends DashboardFragment im } TopIntroPreference topIntroPreference = findPreference(KEY_TOP_INTRO_PREFERENCE); if (topIntroPreference != null) { topIntroPreference.setVisible(!mIsNumberingMode); if (topIntroPreference != null && mIsNumberingMode) { topIntroPreference.setTitle(R.string.top_intro_numbering_system_title); } if (mSystemLocaleAllListPreferenceController != null) { Loading src/com/android/settings/localepicker/SystemLocalePickerFragment.java +12 −5 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import com.android.settings.dashboard.DashboardFragment; import com.android.settings.search.BaseSearchIndexProvider; import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.core.lifecycle.Lifecycle; import com.android.settingslib.widget.TopIntroPreference; import com.google.android.material.appbar.AppBarLayout; Loading @@ -71,14 +72,13 @@ public class SystemLocalePickerFragment extends DashboardFragment implements private static final String KEY_PREFERENCE_SYSTEM_LOCALE_LIST = "system_locale_list"; private static final String KEY_PREFERENCE_SYSTEM_LOCALE_SUGGESTED_LIST = "system_locale_suggested_list"; private static final String KEY_TOP_INTRO_PREFERENCE = "top_intro_region"; @Nullable private SearchView mSearchView = null; @Nullable private SearchFilter mSearchFilter = null; @Nullable private Set<LocaleStore.LocaleInfo> mLocaleList; @Nullable private List<LocaleStore.LocaleInfo> mLocaleOptions; @Nullable private List<LocaleStore.LocaleInfo> mOriginalLocaleInfos; Loading Loading @@ -106,8 +106,15 @@ public class SystemLocalePickerFragment extends DashboardFragment implements } SystemLocaleCollector systemLocaleCollector = new SystemLocaleCollector(getContext(), null); mLocaleList = systemLocaleCollector.getSupportedLocaleList(null, false, false); mLocaleOptions = new ArrayList<>(mLocaleList.size()); Set<LocaleStore.LocaleInfo> localeList = systemLocaleCollector.getSupportedLocaleList(null, false, false); mLocaleOptions = new ArrayList<>(localeList.size()); TopIntroPreference topIntroPreference = findPreference(KEY_TOP_INTRO_PREFERENCE); if (topIntroPreference != null) { topIntroPreference.setVisible(false); } } @Override Loading Loading @@ -175,7 +182,7 @@ public class SystemLocalePickerFragment extends DashboardFragment implements FilterResults results = new FilterResults(); if (mOriginalLocaleInfos == null) { mOriginalLocaleInfos = new ArrayList<>(mLocaleList); mOriginalLocaleInfos = new ArrayList<>(mLocaleOptions); } if (TextUtils.isEmpty(prefix)) { Loading Loading
res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -531,6 +531,7 @@ <string name="title_change_system_locale_region">Change region to %s ?</string> <!-- Message for asking to change system locale region or not. [CHAR LIMIT=50]--> <string name="body_change_system_locale_region">Your device will keep %s as a system language</string> <string name="top_intro_numbering_system_title">The digits used will be dependent on the numbering system</string> <!-- Regional Preferences begin --> <!-- The title of the menu entry of regional preferences. [CHAR LIMIT=50] -->
res/xml/system_language_picker.xml +1 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,7 @@ <com.android.settingslib.widget.TopIntroPreference android:key="top_intro_region" android:title="@string/top_intro_region_title" settings:isPreferenceVisible="false"/> android:title="@string/top_intro_region_title"/> <PreferenceCategory android:key="system_language_suggested_category" Loading
src/com/android/settings/localepicker/LocalePickerBaseListPreferenceController.java +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.settings.localepicker; import static com.android.settings.localepicker.LocaleListEditor.EXTRA_RESULT_LOCALE; import static com.android.settings.localepicker.RegionAndNumberingSystemPickerFragment.EXTRA_IS_NUMBERING_SYSTEM; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.os.LocaleList; Loading Loading @@ -178,7 +179,9 @@ public abstract class LocalePickerBaseListPreferenceController extends pref.setTitle(localeName); pref.setKey(locale.toString()); pref.setOnPreferenceClickListener(clickedPref -> { // TODO: b/390347399 - Should pop up a dialog when changes the region. switchFragment(locale); ((Activity) mContext).finish(); return true; }); mPreferences.put(locale.getId(), pref); Loading
src/com/android/settings/localepicker/RegionAndNumberingSystemPickerFragment.java +2 −2 Original line number Diff line number Diff line Loading @@ -116,8 +116,8 @@ public class RegionAndNumberingSystemPickerFragment extends DashboardFragment im } TopIntroPreference topIntroPreference = findPreference(KEY_TOP_INTRO_PREFERENCE); if (topIntroPreference != null) { topIntroPreference.setVisible(!mIsNumberingMode); if (topIntroPreference != null && mIsNumberingMode) { topIntroPreference.setTitle(R.string.top_intro_numbering_system_title); } if (mSystemLocaleAllListPreferenceController != null) { Loading
src/com/android/settings/localepicker/SystemLocalePickerFragment.java +12 −5 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import com.android.settings.dashboard.DashboardFragment; import com.android.settings.search.BaseSearchIndexProvider; import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.core.lifecycle.Lifecycle; import com.android.settingslib.widget.TopIntroPreference; import com.google.android.material.appbar.AppBarLayout; Loading @@ -71,14 +72,13 @@ public class SystemLocalePickerFragment extends DashboardFragment implements private static final String KEY_PREFERENCE_SYSTEM_LOCALE_LIST = "system_locale_list"; private static final String KEY_PREFERENCE_SYSTEM_LOCALE_SUGGESTED_LIST = "system_locale_suggested_list"; private static final String KEY_TOP_INTRO_PREFERENCE = "top_intro_region"; @Nullable private SearchView mSearchView = null; @Nullable private SearchFilter mSearchFilter = null; @Nullable private Set<LocaleStore.LocaleInfo> mLocaleList; @Nullable private List<LocaleStore.LocaleInfo> mLocaleOptions; @Nullable private List<LocaleStore.LocaleInfo> mOriginalLocaleInfos; Loading Loading @@ -106,8 +106,15 @@ public class SystemLocalePickerFragment extends DashboardFragment implements } SystemLocaleCollector systemLocaleCollector = new SystemLocaleCollector(getContext(), null); mLocaleList = systemLocaleCollector.getSupportedLocaleList(null, false, false); mLocaleOptions = new ArrayList<>(mLocaleList.size()); Set<LocaleStore.LocaleInfo> localeList = systemLocaleCollector.getSupportedLocaleList(null, false, false); mLocaleOptions = new ArrayList<>(localeList.size()); TopIntroPreference topIntroPreference = findPreference(KEY_TOP_INTRO_PREFERENCE); if (topIntroPreference != null) { topIntroPreference.setVisible(false); } } @Override Loading Loading @@ -175,7 +182,7 @@ public class SystemLocalePickerFragment extends DashboardFragment implements FilterResults results = new FilterResults(); if (mOriginalLocaleInfos == null) { mOriginalLocaleInfos = new ArrayList<>(mLocaleList); mOriginalLocaleInfos = new ArrayList<>(mLocaleOptions); } if (TextUtils.isEmpty(prefix)) { Loading