Merge "Fix a possible NPE"

This commit is contained in:
Jean Chalard 2011-08-31 03:06:37 -07:00 committed by Android (Google) Code Review
commit 0fd2135219

View file

@ -336,8 +336,10 @@ public class Settings extends InputMethodSettingsActivity
R.string.auto_correction_threshold_mode_index_off);
final String currentSetting = mAutoCorrectionThresholdPreference.getValue();
mBigramSuggestion.setEnabled(!currentSetting.equals(autoCorrectionOff));
if (null != mBigramPrediction) {
mBigramPrediction.setEnabled(!currentSetting.equals(autoCorrectionOff));
}
}
public Activity getActivityInternal() {
Object thisObject = (Object) this;