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:47:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-20 00:47:29 +0000
commitab2c93e7f478d2001026ac12a0bb7c20444bcd7e (patch)
tree4450ed806e0312efdbaa3f4ff1c4966610e359cb /java/src/com/android/inputmethod/latin/Suggest.java
parentaae90b9f8ec4182a52b68422948530433d2064f0 (diff)
parent7df95c54fa9edd4a9fc9c267b204640299b7bad6 (diff)
downloadlatinime-ab2c93e7f478d2001026ac12a0bb7c20444bcd7e.tar.gz
latinime-ab2c93e7f478d2001026ac12a0bb7c20444bcd7e.tar.xz
latinime-ab2c93e7f478d2001026ac12a0bb7c20444bcd7e.zip
am 7df95c54: Merge "Add prev words context to the SuggestedWordInfo."
* commit '7df95c54fa9edd4a9fc9c267b204640299b7bad6': 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);
}