From 283b0c2b642030539ba3e41f3f54b6aed6bb9e2d Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Thu, 8 Dec 2011 21:37:15 +0900 Subject: [PATCH] Cleanup Here, shouldAutoCorrect implies mSettingsValues.mAutoCorrectEnabled Change-Id: I9256718dd63b75252d1454e264db6814bbf18aa5 --- java/src/com/android/inputmethod/latin/LatinIME.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index ab41b1018..5ee69d1c4 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -2396,11 +2396,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // TODO: cleanup messy flags final boolean shouldAutoCorrect = mSettingsValues.mAutoCorrectEnabled && !mInputTypeNoAutoCorrect; - mCorrectionMode = (shouldAutoCorrect && mSettingsValues.mAutoCorrectEnabled) - ? Suggest.CORRECTION_FULL - : (shouldAutoCorrect ? Suggest.CORRECTION_BASIC : Suggest.CORRECTION_NONE); - mCorrectionMode = (mSettingsValues.mBigramSuggestionEnabled && shouldAutoCorrect - && mSettingsValues.mAutoCorrectEnabled) + mCorrectionMode = shouldAutoCorrect ? Suggest.CORRECTION_FULL : Suggest.CORRECTION_NONE; + mCorrectionMode = (mSettingsValues.mBigramSuggestionEnabled && shouldAutoCorrect) ? Suggest.CORRECTION_FULL_BIGRAM : mCorrectionMode; if (mSuggest != null) { mSuggest.setCorrectionMode(mCorrectionMode);