aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/inputlogic
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic')
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index ce3ef5374..1bc67b2a0 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -1120,7 +1120,7 @@ public final class InputLogic {
final SuggestedWords suggestedWords = holder.get(null,
Constants.GET_SUGGESTED_WORDS_TIMEOUT);
if (suggestedWords != null) {
- mLatinIME.showSuggestionStrip(suggestedWords, suggestedWords.mTypedWord);
+ mLatinIME.showSuggestionStrip(suggestedWords);
}
}
@@ -1217,21 +1217,18 @@ public final class InputLogic {
// Since there is only one word, willAutoCorrect is false.
suggestedWords = suggestedWordsIncludingTypedWord;
}
- // We need to pass typedWord because mWordComposer.mTypedWord may
- // differ from typedWord.
- mLatinIME.unsetIsAutoCorrectionIndicatorOnAndCallShowSuggestionStrip(
- suggestedWords, typedWord);
+ mIsAutoCorrectionIndicatorOn = false;
+ mLatinIME.mHandler.showSuggestionStrip(suggestedWords);
}});
} else {
// We found suggestion spans in the word. We'll create the SuggestedWords out of
// them, and make willAutoCorrect false.
- final SuggestedWords suggestedWords = new SuggestedWords(suggestions,
+ final SuggestedWords suggestedWords = new SuggestedWords(suggestions, typedWord,
true /* typedWordValid */, false /* willAutoCorrect */,
false /* isPunctuationSuggestions */, false /* isObsoleteSuggestions */,
- false /* isPrediction */);
- // We need to pass typedWord because mWordComposer.mTypedWord may differ from typedWord.
- mLatinIME.unsetIsAutoCorrectionIndicatorOnAndCallShowSuggestionStrip(suggestedWords,
- typedWord);
+ false /* isPrediction */, SuggestedWords.NOT_A_SEQUENCE_NUMBER);
+ mIsAutoCorrectionIndicatorOn = false;
+ mLatinIME.mHandler.showSuggestionStrip(suggestedWords);
}
}
@@ -1624,8 +1621,7 @@ public final class InputLogic {
mConnection.commitText(batchInputText.substring(0, indexOfLastSpace), 1);
final SuggestedWords suggestedWordsForLastWordOfPhraseGesture =
suggestedWords.getSuggestedWordsForLastWordOfPhraseGesture();
- mLatinIME.showSuggestionStrip(suggestedWordsForLastWordOfPhraseGesture,
- suggestedWordsForLastWordOfPhraseGesture.mTypedWord);
+ mLatinIME.showSuggestionStrip(suggestedWordsForLastWordOfPhraseGesture);
}
final String lastWord = batchInputText.substring(indexOfLastSpace);
mWordComposer.setBatchInputWord(lastWord);