Merge "Fix an NPE in settings"

This commit is contained in:
Jean Chalard 2011-09-01 23:42:43 -07:00 committed by Android (Google) Code Review
commit 5bb7a64fe2

View file

@ -431,8 +431,10 @@ public class Settings extends InputMethodSettingsActivity
final boolean showBigramSuggestionsOption = res.getBoolean(
R.bool.config_enable_bigram_suggestions_option);
if (!showBigramSuggestionsOption) {
textCorrectionGroup.removePreference(findPreference(PREF_BIGRAM_SUGGESTIONS));
textCorrectionGroup.removePreference(findPreference(PREF_BIGRAM_PREDICTIONS));
textCorrectionGroup.removePreference(mBigramSuggestion);
if (null != mBigramPrediction) {
textCorrectionGroup.removePreference(mBigramPrediction);
}
}
final boolean showUsabilityModeStudyOption = res.getBoolean(