aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-08-20 16:11:03 +0900
committerJean Chalard <jchalard@google.com>2013-08-20 19:18:09 +0900
commite8ef09567077211da034a77b457fd5f87e70f6f0 (patch)
tree572a7d7ed5574e5759ccd778eedf076ba5270b22 /java/src/com/android/inputmethod/latin/ExpandableDictionary.java
parentef1e363016623ccf409c8c270f2c1e35a67734c9 (diff)
downloadlatinime-e8ef09567077211da034a77b457fd5f87e70f6f0.tar.gz
latinime-e8ef09567077211da034a77b457fd5f87e70f6f0.tar.xz
latinime-e8ef09567077211da034a77b457fd5f87e70f6f0.zip
[AC2] Reference a dict rather than a string in suggestion infos
Bug: 9059617 Change-Id: Ic17bc0fd5d812268fd37d7fd35b4e9ebfb95fa5e
Diffstat (limited to 'java/src/com/android/inputmethod/latin/ExpandableDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/ExpandableDictionary.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
index b69e94053..516b8426c 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
@@ -403,7 +403,7 @@ 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, this /* sourceDict */,
SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */));
if (suggestions.size() >= Suggest.MAX_SUGGESTIONS) return false;
}
@@ -412,7 +412,7 @@ 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, this /* sourceDict */,
SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */));
if (suggestions.size() > Suggest.MAX_SUGGESTIONS) return false;
}
@@ -659,8 +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,
- SuggestedWordInfo.NOT_AN_INDEX));
+ freq, SuggestedWordInfo.KIND_CORRECTION, this /* sourceDict */,
+ SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */));
}
}
}