diff options
author | 2012-01-25 21:13:56 -0800 | |
---|---|---|
committer | 2012-01-25 21:13:56 -0800 | |
commit | 5a38ff305f6ee95cecf2d337b7efda1eacff8140 (patch) | |
tree | 455275048d69001c4337cfcabaa73c645629186d /java/src/com/android/inputmethod/latin/Suggest.java | |
parent | fda847a870829f1491cbd5325f9c985213081149 (diff) | |
parent | 6e082cb30dbe1a8cc314b474dc1377b85fdb25c2 (diff) | |
download | latinime-5a38ff305f6ee95cecf2d337b7efda1eacff8140.tar.gz latinime-5a38ff305f6ee95cecf2d337b7efda1eacff8140.tar.xz latinime-5a38ff305f6ee95cecf2d337b7efda1eacff8140.zip |
Merge "Convert an internal enum into an int of same underlying value."
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) |