From ab5912959435c1901e268bc9766090e604f3523d Mon Sep 17 00:00:00 2001 From: Mohammadinamul Sheik Date: Thu, 19 Mar 2015 16:07:04 -0700 Subject: Add prev words context to the SuggestedWordInfo. Bug: 19712589 Bug: 19715579 Change-Id: Ie06665cab8405455c1b0a2ff034e0bb0731c9156 --- java/src/com/android/inputmethod/latin/Suggest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/Suggest.java') 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); } -- cgit v1.2.3-83-g751a