diff options
author | 2012-01-26 12:49:43 +0900 | |
---|---|---|
committer | 2012-01-26 13:07:51 +0900 | |
commit | 6e082cb30dbe1a8cc314b474dc1377b85fdb25c2 (patch) | |
tree | 01437bf12b07f29c34d05ef88e5b466da984086d /java/src/com/android/inputmethod/latin/Suggest.java | |
parent | 61b31a646ea5c65f55891354dfd0485cbbcbc997 (diff) | |
download | latinime-6e082cb30dbe1a8cc314b474dc1377b85fdb25c2.tar.gz latinime-6e082cb30dbe1a8cc314b474dc1377b85fdb25c2.tar.xz latinime-6e082cb30dbe1a8cc314b474dc1377b85fdb25c2.zip |
Convert an internal enum into an int of same underlying value.
Goes together with Id4f4e066
Bug: 5922118
Change-Id: I1e39dd01c67e9284d9d7fe008d868847e69986d7
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 8e0d031f4..f6e177aaf 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -298,7 +298,7 @@ public class Suggest implements Dictionary.WordCallback { if (typedWord != null) { // Treating USER_TYPED as UNIGRAM suggestion for logging now. LatinImeLogger.onAddSuggestedWord(typedWord, Suggest.DIC_USER_TYPED, - Dictionary.DataType.UNIGRAM); + Dictionary.UNIGRAM); } mConsideredWord = consideredWord; @@ -417,12 +417,12 @@ public class Suggest implements Dictionary.WordCallback { @Override public boolean addWord(final char[] word, final int offset, final int length, int score, - final int dicTypeId, final Dictionary.DataType dataType) { - Dictionary.DataType dataTypeForLog = dataType; + final int dicTypeId, final int dataType) { + int dataTypeForLog = dataType; final ArrayList<CharSequence> suggestions; final int[] sortedScores; final int prefMaxSuggestions; - if(dataType == Dictionary.DataType.BIGRAM) { + if (dataType == Dictionary.BIGRAM) { suggestions = mBigramSuggestions; sortedScores = mBigramScores; prefMaxSuggestions = PREF_MAX_BIGRAMS; @@ -450,11 +450,11 @@ public class Suggest implements Dictionary.WordCallback { } } } else { - if (dataType == Dictionary.DataType.UNIGRAM) { + if (dataType == Dictionary.UNIGRAM) { // Check if the word was already added before (by bigram data) int bigramSuggestion = searchBigramSuggestion(word,offset,length); if(bigramSuggestion >= 0) { - dataTypeForLog = Dictionary.DataType.BIGRAM; + dataTypeForLog = Dictionary.BIGRAM; // turn freq from bigram into multiplier specified above double multiplier = (((double) mBigramScores[bigramSuggestion]) / MAXIMUM_BIGRAM_FREQUENCY) |