aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Suggest.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-11-07 16:40:24 +0900
committerJean Chalard <jchalard@google.com>2014-11-07 16:40:24 +0900
commitc3e211bd6be2f35cb7276319f6f4dfa29c315603 (patch)
tree08017a9d6796c070cfbe6e7f6b45da93317895fe /java/src/com/android/inputmethod/latin/Suggest.java
parent6e61cd3b3ba8853513b9d0167e76d670ae31a7f1 (diff)
downloadlatinime-c3e211bd6be2f35cb7276319f6f4dfa29c315603.tar.gz
latinime-c3e211bd6be2f35cb7276319f6f4dfa29c315603.tar.xz
latinime-c3e211bd6be2f35cb7276319f6f4dfa29c315603.zip
Remove a deprecated constructor to SuggestedWords
Change-Id: If4d358b3a11fb25fc214c728269519d8c25f9adc
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java6
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 */,