am b1d87850: Fix updating list preference summary for unknown value

* commit 'b1d87850ec2cb0ef18d56fd3a3fab6ea394c0adc':
  Fix updating list preference summary for unknown value
main
Tadashi G. Takaoka 2013-11-27 22:55:21 -08:00 committed by Android Git Automerger
commit ef8be37af7
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ public final class SettingsFragment extends InputMethodSettingsFragment
final ListPreference listPreference = (ListPreference)findPreference(prefKey);
final CharSequence entries[] = listPreference.getEntries();
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) {