diff options
author | 2013-08-20 11:05:11 +0000 | |
---|---|---|
committer | 2013-08-20 11:05:12 +0000 | |
commit | c10d76f28c23fb068674699a63d563b3710b3cba (patch) | |
tree | 9d3266edf7ab88ff8205d557bda9ee358ad6fbad /java/src/com/android/inputmethod/latin/SuggestedWords.java | |
parent | 3f15c41d88c1060642cec87f02c3cdfd5b4c1cb8 (diff) | |
parent | e8ef09567077211da034a77b457fd5f87e70f6f0 (diff) | |
download | latinime-c10d76f28c23fb068674699a63d563b3710b3cba.tar.gz latinime-c10d76f28c23fb068674699a63d563b3710b3cba.tar.xz latinime-c10d76f28c23fb068674699a63d563b3710b3cba.zip |
Merge "[AC2] Reference a dict rather than a string in suggestion infos"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 9 |
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; |