Fix NPE in InputMethodAndLanguageSettings
Bug: 4422368 Change-Id: I495eb8de9928922b18b37c6658bd8fd8b4ee3e1a
This commit is contained in:
@@ -108,7 +108,7 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
|
|||||||
final int columnIndex = locales.getColumnIndex(UserDictionary.Words.LOCALE);
|
final int columnIndex = locales.getColumnIndex(UserDictionary.Words.LOCALE);
|
||||||
do {
|
do {
|
||||||
final String locale = locales.getString(columnIndex);
|
final String locale = locales.getString(columnIndex);
|
||||||
if (!prefs.containsKey(locale))
|
if (locale != null && !prefs.containsKey(locale))
|
||||||
prefs.put(locale, createUserDictionaryPreference(locale, activity, ++order));
|
prefs.put(locale, createUserDictionaryPreference(locale, activity, ++order));
|
||||||
} while (locales.moveToNext());
|
} while (locales.moveToNext());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user