diff options
author | 2012-06-18 10:30:10 -0700 | |
---|---|---|
committer | 2012-06-18 10:30:10 -0700 | |
commit | 0176faf6c03a8e988b9085e7ac8e8fd6c1dc0b07 (patch) | |
tree | ff3878266b2b9ebfd4a7feb2b72763c063270f4e /java/src/com/android/inputmethod/latin/Suggest.java | |
parent | 1c3c0ff1c3aa6c6ee59ac4641d1d3042964dc0b9 (diff) | |
parent | e7d2ee3ec310a3991f07d20994871bb0dc84941a (diff) | |
download | latinime-0176faf6c03a8e988b9085e7ac8e8fd6c1dc0b07.tar.gz latinime-0176faf6c03a8e988b9085e7ac8e8fd6c1dc0b07.tar.xz latinime-0176faf6c03a8e988b9085e7ac8e8fd6c1dc0b07.zip |
Merge "Add a kind to the suggestion for bookkeeping (A1)"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 7398c82fa..26e4591ed 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -339,15 +339,16 @@ public class Suggest implements Dictionary.WordCallback { for (int i = mTrailingSingleQuotesCount - 1; i >= 0; --i) { sb.appendCodePoint(Keyboard.CODE_SINGLE_QUOTE); } - mSuggestions.add(0, new SuggestedWordInfo( - sb.toString(), SuggestedWordInfo.MAX_SCORE)); + mSuggestions.add(0, new SuggestedWordInfo(sb.toString(), + SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_WHITELIST)); } else { - mSuggestions.add(0, new SuggestedWordInfo( - whitelistedWord, SuggestedWordInfo.MAX_SCORE)); + mSuggestions.add(0, new SuggestedWordInfo(whitelistedWord, + SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_WHITELIST)); } } - mSuggestions.add(0, new SuggestedWordInfo(typedWord, SuggestedWordInfo.MAX_SCORE)); + mSuggestions.add(0, new SuggestedWordInfo(typedWord, SuggestedWordInfo.MAX_SCORE, + SuggestedWordInfo.KIND_TYPED)); SuggestedWordInfo.removeDups(mSuggestions); final ArrayList<SuggestedWordInfo> suggestionsList; @@ -499,7 +500,8 @@ public class Suggest implements Dictionary.WordCallback { for (int i = mTrailingSingleQuotesCount - 1; i >= 0; --i) { sb.appendCodePoint(Keyboard.CODE_SINGLE_QUOTE); } - suggestions.add(pos, new SuggestedWordInfo(sb, score)); + // TODO: figure out what type of suggestion this is + suggestions.add(pos, new SuggestedWordInfo(sb, score, SuggestedWordInfo.KIND_CORRECTION)); if (suggestions.size() > prefMaxSuggestions) { suggestions.remove(prefMaxSuggestions); } else { |