diff options
author | 2013-12-26 03:00:05 -0800 | |
---|---|---|
committer | 2013-12-26 03:00:05 -0800 | |
commit | 94982318e94c2d3b105fc1a2f08a7f3ed0cbc860 (patch) | |
tree | 671cc01d240883c4da9c96a5dceef43a4eff4d06 /java/src | |
parent | 361cbcfc997940f19c8c621552a91ca2a8eb1e47 (diff) | |
parent | 98140faac34ad2250c38c5f651788308adbedb2d (diff) | |
download | latinime-94982318e94c2d3b105fc1a2f08a7f3ed0cbc860.tar.gz latinime-94982318e94c2d3b105fc1a2f08a7f3ed0cbc860.tar.xz latinime-94982318e94c2d3b105fc1a2f08a7f3ed0cbc860.zip |
am 98140faa: [IL38] Fix a wrong double call
* commit '98140faac34ad2250c38c5f651788308adbedb2d':
[IL38] Fix a wrong double call
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index d8fb4f2be..7041c5688 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1378,14 +1378,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen sequenceNumber, new OnGetSuggestedWordsCallback() { @Override public void onGetSuggestedWords(SuggestedWords suggestedWords) { - final int suggestionCount = suggestedWords.size(); - if (suggestionCount <= 1) { - final String mostProbableSuggestion = (suggestionCount == 0) ? null - : suggestedWords.getWord(0); - callback.onGetSuggestedWords( - mLatinIme.getOlderSuggestions(mostProbableSuggestion)); + if (suggestedWords.isEmpty()) { + // Previous suggestions are found in InputLogic#mSuggestedWords. Since + // these are the most recent suggestions and we just recomputed new + // ones to update them, it means the previous ones are there. + callback.onGetSuggestedWords(mLatinIme.mInputLogic.mSuggestedWords); + } else { + callback.onGetSuggestedWords(suggestedWords); } - callback.onGetSuggestedWords(suggestedWords); } }); } |