aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/BinaryDictionary.java
diff options
context:
space:
mode:
authorMohammadinamul Sheik <inamul@google.com>2015-02-06 22:52:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-06 22:52:26 +0000
commit2c36c9944ea4a4752f5c4c83bfa0b7edc22b5400 (patch)
tree56e8d425bee0ed7164cb4a09ffca077638344cf1 /java/src/com/android/inputmethod/latin/BinaryDictionary.java
parent3237983b371fc0f11118a888de4018d1e4984a30 (diff)
parentaadfef6ffaf4fd4249a92252e401cbd98cf79d54 (diff)
downloadlatinime-2c36c9944ea4a4752f5c4c83bfa0b7edc22b5400.tar.gz
latinime-2c36c9944ea4a4752f5c4c83bfa0b7edc22b5400.tar.xz
latinime-2c36c9944ea4a4752f5c4c83bfa0b7edc22b5400.zip
am aadfef6f: Merge "Move decoder specific constants to DecoderSpecificConstants.java"
* commit 'aadfef6ffaf4fd4249a92252e401cbd98cf79d54': Move decoder specific constants to DecoderSpecificConstants.java
Diffstat (limited to 'java/src/com/android/inputmethod/latin/BinaryDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/BinaryDictionary.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index b0eae0832..7e4d66583 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -27,6 +27,7 @@ import com.android.inputmethod.latin.common.Constants;
import com.android.inputmethod.latin.common.FileUtils;
import com.android.inputmethod.latin.common.InputPointers;
import com.android.inputmethod.latin.common.StringUtils;
+import com.android.inputmethod.latin.define.DecoderSpecificConstants;
import com.android.inputmethod.latin.makedict.DictionaryHeader;
import com.android.inputmethod.latin.makedict.FormatSpec;
import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
@@ -319,9 +320,9 @@ public final class BinaryDictionary extends Dictionary {
final int count = session.mOutputSuggestionCount[0];
final ArrayList<SuggestedWordInfo> suggestions = new ArrayList<>();
for (int j = 0; j < count; ++j) {
- final int start = j * Constants.DICTIONARY_MAX_WORD_LENGTH;
+ final int start = j * DecoderSpecificConstants.DICTIONARY_MAX_WORD_LENGTH;
int len = 0;
- while (len < Constants.DICTIONARY_MAX_WORD_LENGTH
+ while (len < DecoderSpecificConstants.DICTIONARY_MAX_WORD_LENGTH
&& session.mOutputCodePoints[start + len] != 0) {
++len;
}
@@ -390,7 +391,7 @@ public final class BinaryDictionary extends Dictionary {
return null;
}
final int[] codePoints = StringUtils.toCodePointArray(word);
- final int[] outCodePoints = new int[Constants.DICTIONARY_MAX_WORD_LENGTH];
+ final int[] outCodePoints = new int[DecoderSpecificConstants.DICTIONARY_MAX_WORD_LENGTH];
final boolean[] outFlags = new boolean[FORMAT_WORD_PROPERTY_OUTPUT_FLAG_COUNT];
final int[] outProbabilityInfo =
new int[FORMAT_WORD_PROPERTY_OUTPUT_PROBABILITY_INFO_COUNT];
@@ -431,7 +432,7 @@ public final class BinaryDictionary extends Dictionary {
* If token is 0, this method newly starts iterating the dictionary.
*/
public GetNextWordPropertyResult getNextWordProperty(final int token) {
- final int[] codePoints = new int[Constants.DICTIONARY_MAX_WORD_LENGTH];
+ final int[] codePoints = new int[DecoderSpecificConstants.DICTIONARY_MAX_WORD_LENGTH];
final boolean[] isBeginningOfSentence = new boolean[1];
final int nextToken = getNextWordNative(mNativeDict, token, codePoints,
isBeginningOfSentence);