Show only up to two locales in Settings

The list could otherwise grow very long, spamming the screen.

Bug: 28872122
Change-Id: I8c4dbe659e1c088eba8b5ba1b2905b5eb8bc0229
This commit is contained in:
Roozbeh Pournader
2016-05-26 19:01:06 -07:00
parent c416433a9e
commit 217b1d1581

View File

@@ -353,7 +353,9 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
final LocaleList locales = LocalePicker.getLocales();
final Locale displayLocale = Locale.getDefault();
return LocaleHelper.toSentenceCase(
LocaleHelper.getDisplayLocaleList(locales, displayLocale), displayLocale);
LocaleHelper.getDisplayLocaleList(
locales, displayLocale, 2 /* Show up to two locales from the list */),
displayLocale);
}
private void saveInputMethodSelectorVisibility(String value) {