aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-08-26 12:25:59 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-26 12:25:59 +0000
commit2a2d324eb627807a9d09b491fbb4ac78ffb253fc (patch)
treeff2659369eb2c6e7d4a0400fcdb3cf10b40c518d /java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
parentabf05cc0da1ead7e270a7c99bf9f000dabf91f5b (diff)
parent8380f921f7edaeea2033a1e967a14941400fe246 (diff)
downloadlatinime-2a2d324eb627807a9d09b491fbb4ac78ffb253fc.tar.gz
latinime-2a2d324eb627807a9d09b491fbb4ac78ffb253fc.tar.xz
latinime-2a2d324eb627807a9d09b491fbb4ac78ffb253fc.zip
am 8380f921: Fix a bug where the top prediction would disappear.
* commit '8380f921f7edaeea2033a1e967a14941400fe246': Fix a bug where the top prediction would disappear.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java')
-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 616828efe..a6978809a 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -638,7 +638,7 @@ public final class InputLogic {
case Constants.CODE_SHIFT:
performRecapitalization(inputTransaction.mSettingsValues);
inputTransaction.requireShiftUpdate(InputTransaction.SHIFT_UPDATE_NOW);
- if (mSuggestedWords.mIsPrediction) {
+ if (mSuggestedWords.isPrediction()) {
inputTransaction.setRequiresUpdateSuggestions();
}
break;
@@ -1466,11 +1466,10 @@ public final class InputLogic {
&& !shouldIncludeResumedWordInSuggestions) {
// We were able to compute new suggestions for this word.
// Remove the typed word, since we don't want to display it in this
- // case. The #getSuggestedWordsExcludingTypedWord() method sets
- // willAutoCorrect to false.
+ // case. The #getSuggestedWordsExcludingTypedWordForRecorrection()
+ // method sets willAutoCorrect to false.
suggestedWords = suggestedWordsIncludingTypedWord
- .getSuggestedWordsExcludingTypedWord(SuggestedWords
- .INPUT_STYLE_RECORRECTION);
+ .getSuggestedWordsExcludingTypedWordForRecorrection();
} else {
// No saved suggestions, and we were unable to compute any good one
// either. Rather than displaying an empty suggestion strip, we'll
@@ -1487,11 +1486,9 @@ public final class InputLogic {
// color of the word in the suggestion strip changes according to this parameter,
// and false gives the correct color.
final SuggestedWords suggestedWords = new SuggestedWords(suggestions,
- null /* rawSuggestions */, typedWord,
- false /* typedWordValid */, false /* willAutoCorrect */,
- false /* isObsoleteSuggestions */, false /* isPrediction */,
- SuggestedWords.INPUT_STYLE_RECORRECTION,
- SuggestedWords.NOT_A_SEQUENCE_NUMBER);
+ null /* rawSuggestions */, typedWord, false /* typedWordValid */,
+ false /* willAutoCorrect */, false /* isObsoleteSuggestions */,
+ SuggestedWords.INPUT_STYLE_RECORRECTION, SuggestedWords.NOT_A_SEQUENCE_NUMBER);
mIsAutoCorrectionIndicatorOn = false;
mLatinIME.mHandler.showSuggestionStrip(suggestedWords);
}
@@ -1787,8 +1784,7 @@ public final class InputLogic {
SuggestedWords.getTypedWordAndPreviousSuggestions(typedWord, oldSuggestedWords);
return new SuggestedWords(typedWordAndPreviousSuggestions, null /* rawSuggestions */,
false /* typedWordValid */, false /* hasAutoCorrectionCandidate */,
- true /* isObsoleteSuggestions */, false /* isPrediction */,
- oldSuggestedWords.mInputStyle);
+ true /* isObsoleteSuggestions */, oldSuggestedWords.mInputStyle);
}
/**