aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-09 19:58:28 +0900
committerJean Chalard <jchalard@google.com>2012-03-09 20:51:33 +0900
commitc5d2bb786e431776ee3834bf556127fcae5b0fbe (patch)
tree93ce02f1f91342bbe6c594fce0cd7f68d0c56a26 /java/src
parented9986824e1339855376771ad29fae4de921a029 (diff)
downloadlatinime-c5d2bb786e431776ee3834bf556127fcae5b0fbe.tar.gz
latinime-c5d2bb786e431776ee3834bf556127fcae5b0fbe.tar.xz
latinime-c5d2bb786e431776ee3834bf556127fcae5b0fbe.zip
Don't use an intermediate object with a different meaning
Change-Id: Ie89916b49c852a51385ffd61cb596a58f23a46a0
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 5e1795a26..6c89fbae4 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1834,13 +1834,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
} else {
SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions();
if (previousSuggestions == mSettingsValues.mSuggestPuncList) {
- if (builder.size() == 0) {
+ if (!mWordComposer.isComposingWord()) {
return;
}
previousSuggestions = SuggestedWords.EMPTY;
}
- builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
- showSuggestions(builder.build(), typedWord);
+ final SuggestedWords.Builder obsoleteSuggestionsBuilder = new SuggestedWords.Builder()
+ .addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
+ showSuggestions(obsoleteSuggestionsBuilder.build(), typedWord);
}
}