diff options
author | 2012-03-09 19:58:28 +0900 | |
---|---|---|
committer | 2012-03-09 20:51:33 +0900 | |
commit | c5d2bb786e431776ee3834bf556127fcae5b0fbe (patch) | |
tree | 93ce02f1f91342bbe6c594fce0cd7f68d0c56a26 /java/src | |
parent | ed9986824e1339855376771ad29fae4de921a029 (diff) | |
download | latinime-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.java | 7 |
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); } } |