aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-03-03 22:53:49 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-03 22:53:49 -0800
commitf2bfd35c56526a7b0da5399b53e2dc00b58768f3 (patch)
treeffe43929f0dfb6447aff9c50c95a9500aea84d55 /java/src/com/android
parent58b18e8a17d9bde26bea9e8680fedd0dfe12350c (diff)
parent5d8f6660bfd7b9e8a04d8deff8127f07b8d56e69 (diff)
downloadlatinime-f2bfd35c56526a7b0da5399b53e2dc00b58768f3.tar.gz
latinime-f2bfd35c56526a7b0da5399b53e2dc00b58768f3.tar.xz
latinime-f2bfd35c56526a7b0da5399b53e2dc00b58768f3.zip
am 5d8f6660: [IL113] More cleanup
* commit '5d8f6660bfd7b9e8a04d8deff8127f07b8d56e69': [IL113] More cleanup
Diffstat (limited to 'java/src/com/android')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 020dd87d4..3c5c8bf70 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1450,17 +1450,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// We update the suggestion strip only when we have some suggestions to show, i.e. when
// the suggestion count is > 1; else, we leave the old suggestions, with the typed word
// replaced with the new one. However, when the length of the typed word is 1 or 0 (after
- // a deletion typically), we do want to remove the old suggestions. Also, if we are showing
- // the "add to dictionary" hint, we need to revert to suggestions - although it is unclear
- // how we can come here if it's displayed.
- if (suggestedWords.size() > 1 || typedWord.length() <= 1
- || !hasSuggestionStripView() || isShowingAddToDictionaryHint()) {
+ // a deletion typically), we do want to remove the old suggestions.
+ if (suggestedWords.size() > 1 || typedWord.length() <= 1) {
return suggestedWords;
} else {
- final SuggestedWords punctuationList =
- mSettings.getCurrent().mSpacingAndPunctuations.mSuggestPuncList;
- final SuggestedWords oldSuggestedWords = previousSuggestedWords == punctuationList
- ? SuggestedWords.EMPTY : previousSuggestedWords;
+ final SuggestedWords oldSuggestedWords =
+ previousSuggestedWords.isPunctuationSuggestions() ? SuggestedWords.EMPTY
+ : previousSuggestedWords;
final ArrayList<SuggestedWords.SuggestedWordInfo> typedWordAndPreviousSuggestions =
SuggestedWords.getTypedWordAndPreviousSuggestions(typedWord, oldSuggestedWords);
return new SuggestedWords(typedWordAndPreviousSuggestions, null /* rawSuggestions */,