diff options
author | 2014-11-07 08:52:25 +0000 | |
---|---|---|
committer | 2014-11-07 08:52:25 +0000 | |
commit | e96f2a2afbc7bd5b5b7550c93b568d17b83ad897 (patch) | |
tree | bee9252aa8bcd400c0a9d8245190762b088f9741 /java/src/com/android/inputmethod/latin/Suggest.java | |
parent | d134eb2b7e77656943a7b268c6ce43bbec8af2bd (diff) | |
parent | e0c2e5b2f731d612df5005c770ddd8cf47180e19 (diff) | |
download | latinime-e96f2a2afbc7bd5b5b7550c93b568d17b83ad897.tar.gz latinime-e96f2a2afbc7bd5b5b7550c93b568d17b83ad897.tar.xz latinime-e96f2a2afbc7bd5b5b7550c93b568d17b83ad897.zip |
am e0c2e5b2: Merge "Remove a deprecated constructor to SuggestedWords"
* commit 'e0c2e5b2f731d612df5005c770ddd8cf47180e19':
Remove a deprecated constructor to SuggestedWords
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 9b4619d35..ee8d3f8cb 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -230,7 +230,7 @@ public final class Suggest { inputStyle = inputStyleIfNotPrediction; } callback.onGetSuggestedWords(new SuggestedWords(suggestionsList, - suggestionResults.mRawSuggestions, + suggestionResults.mRawSuggestions, typedWord, // TODO: this first argument is lying. If this is a whitelisted word which is an // actual word, it says typedWordValid = false, which looks wrong. We should either // rename the attribute or change the value. @@ -286,8 +286,12 @@ public final class Suggest { // (typedWordValid=true), not as an "auto correct word" (willAutoCorrect=false). // Note that because this method is never used to get predictions, there is no need to // modify inputType such in getSuggestedWordsForNonBatchInput. + final String pseudoTypedWord = suggestionsContainer.isEmpty() ? null + : suggestionsContainer.get(0).mWord; + callback.onGetSuggestedWords(new SuggestedWords(suggestionsContainer, suggestionResults.mRawSuggestions, + pseudoTypedWord, true /* typedWordValid */, false /* willAutoCorrect */, false /* isObsoleteSuggestions */, |