diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 110a7e7c7..2b1112d10 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1054,9 +1054,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen false /* isObsoleteSuggestions */, false /* isPrediction */); // When in fullscreen mode, show completions generated by the application - final boolean isAutoCorrection = false; - setSuggestedWords(suggestedWords, isAutoCorrection); - setAutoCorrectionIndicator(isAutoCorrection); + setSuggestedWords(suggestedWords); + setAutoCorrectionIndicator(false); setSuggestionStripShown(true); if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions); @@ -1499,16 +1498,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // TODO[IL]: Define a clear interface for this public void clearSuggestionStrip() { - setSuggestedWords(SuggestedWords.EMPTY, false); + setSuggestedWords(SuggestedWords.EMPTY); setAutoCorrectionIndicator(false); } // TODO[IL]: Define a clear interface for this - public void setSuggestedWords(final SuggestedWords words, final boolean isAutoCorrection) { + public void setSuggestedWords(final SuggestedWords words) { mInputLogic.mSuggestedWords = words; if (mSuggestionStripView != null) { mSuggestionStripView.setSuggestions(words); - mKeyboardSwitcher.onAutoCorrectionStateChanged(isAutoCorrection); + mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect); } } @@ -1621,7 +1620,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen autoCorrection = typedWord; } mInputLogic.mWordComposer.setAutoCorrection(autoCorrection); - setSuggestedWords(suggestedWords, suggestedWords.mWillAutoCorrect); + setSuggestedWords(suggestedWords); setAutoCorrectionIndicator(suggestedWords.mWillAutoCorrect); setSuggestionStripShown(isSuggestionsStripVisible()); // An auto-correction is available, cache it in accessibility code so @@ -1740,7 +1739,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (currentSettings.mBigramPredictionEnabled) { clearSuggestionStrip(); } else { - setSuggestedWords(currentSettings.mSuggestPuncList, false); + setSuggestedWords(currentSettings.mSuggestPuncList); } setAutoCorrectionIndicator(false); setSuggestionStripShown(isSuggestionsStripVisible()); diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index e2ec5a97a..7ed42846e 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -1391,7 +1391,7 @@ public final class InputLogic { if (settingsValues.mBigramPredictionEnabled) { mLatinIME.clearSuggestionStrip(); } else { - mLatinIME.setSuggestedWords(settingsValues.mSuggestPuncList, false); + mLatinIME.setSuggestedWords(settingsValues.mSuggestPuncList); } mConnection.resetCachesUponCursorMoveAndReturnSuccess(newSelStart, newSelEnd, shouldFinishComposition);