diff options
author | 2014-02-25 01:58:43 -0800 | |
---|---|---|
committer | 2014-02-25 01:58:43 -0800 | |
commit | 9f5acd4edecd0dcfeeeb6090cc57c138f766d793 (patch) | |
tree | 44f121762ad67fd017bef09c464f4e58a5385887 /java/src/com/android | |
parent | 3fb8aaf079f7c7ecd683c8e977919d7b08b7fcf6 (diff) | |
parent | 783f1932393547b2bcb88e6dc454ce888ce1d4a1 (diff) | |
download | latinime-9f5acd4edecd0dcfeeeb6090cc57c138f766d793.tar.gz latinime-9f5acd4edecd0dcfeeeb6090cc57c138f766d793.tar.xz latinime-9f5acd4edecd0dcfeeeb6090cc57c138f766d793.zip |
am 783f1932: [QRP4] Simplification & small correctness fix.
* commit '783f1932393547b2bcb88e6dc454ce888ce1d4a1':
[QRP4] Simplification & small correctness fix.
Diffstat (limited to 'java/src/com/android')
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java index ecefecf19..9b66773e0 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java @@ -248,18 +248,18 @@ final class SuggestionStripLayoutHelper { final int indexInSuggestedWords) { final int positionInStrip = getPositionInSuggestionStrip(indexInSuggestedWords, suggestedWords); - // TODO: Need to revisit this logic with bigram suggestions - final boolean isSuggested = (indexInSuggestedWords != SuggestedWords.INDEX_OF_TYPED_WORD); + final boolean isTypedWord = !suggestedWords.mIsPrediction + && (indexInSuggestedWords == SuggestedWords.INDEX_OF_TYPED_WORD); final int color; if (positionInStrip == mCenterPositionInStrip && suggestedWords.mWillAutoCorrect) { color = mColorAutoCorrect; } else if (positionInStrip == mCenterPositionInStrip && suggestedWords.mTypedWordValid) { color = mColorValidTypedWord; - } else if (isSuggested) { - color = mColorSuggested; - } else { + } else if (isTypedWord) { color = mColorTypedWord; + } else { + color = mColorSuggested; } if (LatinImeLogger.sDBG && suggestedWords.size() > 1) { // If we auto-correct, then the autocorrection is in slot 0 and the typed word @@ -272,7 +272,7 @@ final class SuggestionStripLayoutHelper { } } - if (suggestedWords.mIsObsoleteSuggestions && isSuggested) { + if (suggestedWords.mIsObsoleteSuggestions && !isTypedWord) { return applyAlpha(color, mAlphaObsoleted); } return color; |