diff options
author | 2013-08-20 12:21:07 +0900 | |
---|---|---|
committer | 2013-08-20 18:43:19 +0900 | |
commit | ef1e363016623ccf409c8c270f2c1e35a67734c9 (patch) | |
tree | f4627781dcf73e7383f68101c88ffe8afadfe442 /java/src/com/android/inputmethod/latin/ExpandableDictionary.java | |
parent | 065aad9501ae446aee5d73450c01dc21b8f3242a (diff) | |
download | latinime-ef1e363016623ccf409c8c270f2c1e35a67734c9.tar.gz latinime-ef1e363016623ccf409c8c270f2c1e35a67734c9.tar.xz latinime-ef1e363016623ccf409c8c270f2c1e35a67734c9.zip |
[AC1] Add a memory of where to cut the first word.
Bug: 9059617
Change-Id: I931b6d1eb49f9f7dd7d5b18956e35751d1b2b631
Diffstat (limited to 'java/src/com/android/inputmethod/latin/ExpandableDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/ExpandableDictionary.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java index bd2d70365..b69e94053 100644 --- a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java +++ b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java @@ -403,7 +403,8 @@ public class ExpandableDictionary extends Dictionary { // the respective size of the typed word and the suggestion if it matters sometime // in the future. suggestions.add(new SuggestedWordInfo(new String(word, 0, depth + 1), finalFreq, - SuggestedWordInfo.KIND_CORRECTION, mDictType)); + SuggestedWordInfo.KIND_CORRECTION, mDictType, + SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */)); if (suggestions.size() >= Suggest.MAX_SUGGESTIONS) return false; } if (null != node.mShortcutTargets) { @@ -411,7 +412,8 @@ public class ExpandableDictionary extends Dictionary { for (int shortcutIndex = 0; shortcutIndex < length; ++shortcutIndex) { final char[] shortcut = node.mShortcutTargets.get(shortcutIndex); suggestions.add(new SuggestedWordInfo(new String(shortcut, 0, shortcut.length), - finalFreq, SuggestedWordInfo.KIND_SHORTCUT, mDictType)); + finalFreq, SuggestedWordInfo.KIND_SHORTCUT, mDictType, + SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */)); if (suggestions.size() > Suggest.MAX_SUGGESTIONS) return false; } } @@ -657,7 +659,8 @@ public class ExpandableDictionary extends Dictionary { if (freq >= 0 && node == null) { suggestions.add(new SuggestedWordInfo(new String(mLookedUpString, index, Constants.DICTIONARY_MAX_WORD_LENGTH - index), - freq, SuggestedWordInfo.KIND_CORRECTION, mDictType)); + freq, SuggestedWordInfo.KIND_CORRECTION, mDictType, + SuggestedWordInfo.NOT_AN_INDEX)); } } } |