aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Suggest.java
diff options
context:
space:
mode:
authorMohammadinamul Sheik <inamul@google.com>2015-03-20 00:41:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-20 00:41:27 +0000
commit7df95c54fa9edd4a9fc9c267b204640299b7bad6 (patch)
tree22dfcb22bddf6902b6f046110314e4fe81c2b2bb /java/src/com/android/inputmethod/latin/Suggest.java
parent6c1c337227d101ee92b508b63b1d74293cc2e5c0 (diff)
parentab5912959435c1901e268bc9766090e604f3523d (diff)
downloadlatinime-7df95c54fa9edd4a9fc9c267b204640299b7bad6.tar.gz
latinime-7df95c54fa9edd4a9fc9c267b204640299b7bad6.tar.xz
latinime-7df95c54fa9edd4a9fc9c267b204640299b7bad6.zip
Merge "Add prev words context to the SuggestedWordInfo."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 8562acd83..7ccefd2dd 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -36,7 +36,6 @@ import java.util.HashMap;
import java.util.Locale;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
/**
* This class loads a dictionary and provides a list of suggestions for a given sequence of
@@ -249,7 +248,8 @@ public final class Suggest {
}
final SuggestedWordInfo typedWordInfo = new SuggestedWordInfo(typedWordString,
- SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_TYPED,
+ "" /* prevWordsContext */, SuggestedWordInfo.MAX_SCORE,
+ SuggestedWordInfo.KIND_TYPED,
null == sourceDictionaryOfRemovedWord ? Dictionary.DICTIONARY_USER_TYPED
: sourceDictionaryOfRemovedWord,
SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */,
@@ -426,7 +426,8 @@ public final class Suggest {
for (int i = quotesToAppend - 1; i >= 0; --i) {
sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
}
- return new SuggestedWordInfo(sb.toString(), wordInfo.mScore, wordInfo.mKindAndFlags,
+ return new SuggestedWordInfo(sb.toString(), wordInfo.mPrevWordsContext,
+ wordInfo.mScore, wordInfo.mKindAndFlags,
wordInfo.mSourceDict, wordInfo.mIndexOfTouchPointOfSecondWord,
wordInfo.mAutoCommitFirstWordConfidence);
}