Fix updating list preference summary for unknown value
Change-Id: I86d3162a90e0068e787a906c0d3d64102487620a
This commit is contained in:
parent
3c7b603c46
commit
b1d87850ec
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ public final class SettingsFragment extends InputMethodSettingsFragment
|
||||||
final ListPreference listPreference = (ListPreference)findPreference(prefKey);
|
final ListPreference listPreference = (ListPreference)findPreference(prefKey);
|
||||||
final CharSequence entries[] = listPreference.getEntries();
|
final CharSequence entries[] = listPreference.getEntries();
|
||||||
final int entryIndex = listPreference.findIndexOfValue(listPreference.getValue());
|
final int entryIndex = listPreference.findIndexOfValue(listPreference.getValue());
|
||||||
listPreference.setSummary(entries[entryIndex]);
|
listPreference.setSummary(entryIndex < 0 ? null : entries[entryIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void removePreference(final String preferenceKey, final PreferenceGroup parent) {
|
private static void removePreference(final String preferenceKey, final PreferenceGroup parent) {
|
||||||
|
|
Loading…
Reference in a new issue