Loading src/com/android/settings/inputmethod/UserDictionaryListPreferenceController.java +5 −6 Original line number Diff line number Diff line Loading @@ -124,14 +124,14 @@ public class UserDictionaryListPreferenceController extends BasePreferenceContro // enabled subtypes. If we already have the locale-without-country version of the system // locale, we don't add the system locale to avoid confusion even though it's technically // correct to add it. if (!localeSet.contains(Locale.getDefault().getLanguage().toString())) { if (!localeSet.contains(Locale.getDefault().getLanguage())) { localeSet.add(Locale.getDefault().toString()); } return localeSet; } @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) @VisibleForTesting TreeSet<String> getUserDictLocalesSet(Context context) { return getUserDictionaryLocalesSet(context); } Loading @@ -140,7 +140,6 @@ public class UserDictionaryListPreferenceController extends BasePreferenceContro * Creates the entries that allow the user to go into the user dictionary for each locale. */ private void createUserDictSettings() { final TreeSet<String> localeSet = getUserDictLocalesSet(mContext); final int prefCount = mScreen.getPreferenceCount(); String prefKey; Loading @@ -160,8 +159,8 @@ public class UserDictionaryListPreferenceController extends BasePreferenceContro if (prefCount > 0) { for (int i = prefCount - 1; i >= 0; i--) { prefKey = mScreen.getPreference(i).getKey(); if (KEY_ALL_LANGUAGE.equals(prefKey)) { prefKey = ""; if (TextUtils.isEmpty(prefKey) || TextUtils.equals(KEY_ALL_LANGUAGE, prefKey)) { continue; } if (!localeSet.isEmpty() && localeSet.contains(prefKey)) { localeSet.remove(prefKey); Loading tests/robotests/src/com/android/settings/inputmethod/UserDictionaryListControllerTest.java +3 −3 File changed.Contains only whitespace changes. Show changes Loading
src/com/android/settings/inputmethod/UserDictionaryListPreferenceController.java +5 −6 Original line number Diff line number Diff line Loading @@ -124,14 +124,14 @@ public class UserDictionaryListPreferenceController extends BasePreferenceContro // enabled subtypes. If we already have the locale-without-country version of the system // locale, we don't add the system locale to avoid confusion even though it's technically // correct to add it. if (!localeSet.contains(Locale.getDefault().getLanguage().toString())) { if (!localeSet.contains(Locale.getDefault().getLanguage())) { localeSet.add(Locale.getDefault().toString()); } return localeSet; } @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) @VisibleForTesting TreeSet<String> getUserDictLocalesSet(Context context) { return getUserDictionaryLocalesSet(context); } Loading @@ -140,7 +140,6 @@ public class UserDictionaryListPreferenceController extends BasePreferenceContro * Creates the entries that allow the user to go into the user dictionary for each locale. */ private void createUserDictSettings() { final TreeSet<String> localeSet = getUserDictLocalesSet(mContext); final int prefCount = mScreen.getPreferenceCount(); String prefKey; Loading @@ -160,8 +159,8 @@ public class UserDictionaryListPreferenceController extends BasePreferenceContro if (prefCount > 0) { for (int i = prefCount - 1; i >= 0; i--) { prefKey = mScreen.getPreference(i).getKey(); if (KEY_ALL_LANGUAGE.equals(prefKey)) { prefKey = ""; if (TextUtils.isEmpty(prefKey) || TextUtils.equals(KEY_ALL_LANGUAGE, prefKey)) { continue; } if (!localeSet.isEmpty() && localeSet.contains(prefKey)) { localeSet.remove(prefKey); Loading
tests/robotests/src/com/android/settings/inputmethod/UserDictionaryListControllerTest.java +3 −3 File changed.Contains only whitespace changes. Show changes