Don't use an intermediate object with a different meaning
Change-Id: Ie89916b49c852a51385ffd61cb596a58f23a46a0
This commit is contained in:
parent
ed9986824e
commit
c5d2bb786e
1 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue