aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/SuggestedWords.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/SuggestedWords.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/SuggestedWords.java')
-rw-r--r--java/src/com/android/inputmethod/latin/SuggestedWords.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java
index 89a31f0a0..3d6d0d751 100644
--- a/java/src/com/android/inputmethod/latin/SuggestedWords.java
+++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java
@@ -113,7 +113,7 @@ public final class SuggestedWords {
if (null == text) continue;
final SuggestedWordInfo suggestedWordInfo = new SuggestedWordInfo(text.toString(),
SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_APP_DEFINED,
- Dictionary.TYPE_APPLICATION_DEFINED,
+ Dictionary.DICTIONARY_APPLICATION_DEFINED,
SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */);
result.add(suggestedWordInfo);
}
@@ -127,7 +127,7 @@ public final class SuggestedWords {
final ArrayList<SuggestedWordInfo> suggestionsList = CollectionUtils.newArrayList();
final HashSet<String> alreadySeen = CollectionUtils.newHashSet();
suggestionsList.add(new SuggestedWordInfo(typedWord, SuggestedWordInfo.MAX_SCORE,
- SuggestedWordInfo.KIND_TYPED, Dictionary.TYPE_USER_TYPED,
+ SuggestedWordInfo.KIND_TYPED, Dictionary.DICTIONARY_USER_TYPED,
SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */));
alreadySeen.add(typedWord.toString());
final int previousSize = previousSuggestions.size();
@@ -169,7 +169,7 @@ public final class SuggestedWords {
public final int mScore;
public final int mKind; // one of the KIND_* constants above
public final int mCodePointCount;
- public final String mSourceDict;
+ public final Dictionary mSourceDict;
// For auto-commit. This keeps track of the index inside the touch coordinates array
// passed to native code to get suggestions for a gesture that corresponds to the first
// letter of the second word.
@@ -177,7 +177,7 @@ public final class SuggestedWords {
private String mDebugString = "";
public SuggestedWordInfo(final String word, final int score, final int kind,
- final String sourceDict, final int indexOfTouchPointOfSecondWord) {
+ final Dictionary sourceDict, final int indexOfTouchPointOfSecondWord) {
mWord = word;
mScore = score;
mKind = kind;
@@ -186,7 +186,6 @@ public final class SuggestedWords {
mIndexOfTouchPointOfSecondWord = indexOfTouchPointOfSecondWord;
}
-
public void setDebugString(final String str) {
if (null == str) throw new NullPointerException("Debug info is null");
mDebugString = str;