diff options
author | 2014-06-26 05:05:43 +0000 | |
---|---|---|
committer | 2014-06-24 01:52:26 +0000 | |
commit | 92827b0712f8afecb4800a4137470ba64cd0c505 (patch) | |
tree | 927131a0daebd146b2426e77cd3b7c145f8074a5 /java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java | |
parent | 520765491cbfcb8d2e66ee5c492a66eb8a726a74 (diff) | |
parent | e708b1bc2e11285ad404133b8de21719ce08acb5 (diff) | |
download | latinime-92827b0712f8afecb4800a4137470ba64cd0c505.tar.gz latinime-92827b0712f8afecb4800a4137470ba64cd0c505.tar.xz latinime-92827b0712f8afecb4800a4137470ba64cd0c505.zip |
Merge "Make PrevWordsInfo have multiple words' information."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java index 96160fa4e..ad14c06ef 100644 --- a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java @@ -233,19 +233,19 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary { final int wordLen = StringUtils.codePointCount(word); if (wordLen < MAX_WORD_LENGTH && wordLen > 1) { if (DEBUG) { - Log.d(TAG, "addName " + name + ", " + word + ", " - + prevWordsInfo.mPrevWord); + Log.d(TAG, "addName " + name + ", " + word + ", " + prevWordsInfo); } runGCIfRequiredLocked(true /* mindsBlockByGC */); addUnigramLocked(word, FREQUENCY_FOR_CONTACTS, null /* shortcut */, 0 /* shortcutFreq */, false /* isNotAWord */, false /* isBlacklisted */, BinaryDictionary.NOT_A_VALID_TIMESTAMP); - if (!TextUtils.isEmpty(prevWordsInfo.mPrevWord) && mUseFirstLastBigrams) { + if (!prevWordsInfo.isValid() && mUseFirstLastBigrams) { runGCIfRequiredLocked(true /* mindsBlockByGC */); addNgramEntryLocked(prevWordsInfo, word, FREQUENCY_FOR_CONTACTS_BIGRAM, BinaryDictionary.NOT_A_VALID_TIMESTAMP); } - prevWordsInfo = new PrevWordsInfo(word); + prevWordsInfo = prevWordsInfo.getNextPrevWordsInfo( + new PrevWordsInfo.WordInfo(word)); } } } |