Here, shouldAutoCorrect implies mSettingsValues.mAutoCorrectEnabled

Change-Id: I9256718dd63b75252d1454e264db6814bbf18aa5
This commit is contained in:
Jean Chalard 2011-12-08 21:37:15 +09:00
parent 9e38f9a980
commit 283b0c2b64

View file

@ -2396,11 +2396,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// TODO: cleanup messy flags // TODO: cleanup messy flags
final boolean shouldAutoCorrect = mSettingsValues.mAutoCorrectEnabled final boolean shouldAutoCorrect = mSettingsValues.mAutoCorrectEnabled
&& !mInputTypeNoAutoCorrect; && !mInputTypeNoAutoCorrect;
mCorrectionMode = (shouldAutoCorrect && mSettingsValues.mAutoCorrectEnabled) mCorrectionMode = shouldAutoCorrect ? Suggest.CORRECTION_FULL : Suggest.CORRECTION_NONE;
? Suggest.CORRECTION_FULL mCorrectionMode = (mSettingsValues.mBigramSuggestionEnabled && shouldAutoCorrect)
: (shouldAutoCorrect ? Suggest.CORRECTION_BASIC : Suggest.CORRECTION_NONE);
mCorrectionMode = (mSettingsValues.mBigramSuggestionEnabled && shouldAutoCorrect
&& mSettingsValues.mAutoCorrectEnabled)
? Suggest.CORRECTION_FULL_BIGRAM : mCorrectionMode; ? Suggest.CORRECTION_FULL_BIGRAM : mCorrectionMode;
if (mSuggest != null) { if (mSuggest != null) {
mSuggest.setCorrectionMode(mCorrectionMode); mSuggest.setCorrectionMode(mCorrectionMode);