aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-09 18:18:24 +0900
committerJean Chalard <jchalard@google.com>2012-03-09 18:44:23 +0900
commitdbd140504d0f1c6b02998d0899efc853e78a3966 (patch)
tree2ce5d1e61f7652b5fa725c650b9b8179eafe7c03 /java/src
parent0b96bc4b2b9c523c0228ed53e4576518cd7ab3eb (diff)
downloadlatinime-dbd140504d0f1c6b02998d0899efc853e78a3966.tar.gz
latinime-dbd140504d0f1c6b02998d0899efc853e78a3966.tar.xz
latinime-dbd140504d0f1c6b02998d0899efc853e78a3966.zip
Reduction, step 5
Change-Id: Iac52e62c2bdffad14f916f69eade2b785bb41767
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java14
1 files changed, 3 insertions, 11 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 058c8ad74..034fe09ba 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -263,8 +263,6 @@ public class Suggest implements Dictionary.WordCallback {
private static final WordComposer sEmptyWordComposer = new WordComposer();
public SuggestedWords.Builder getBigramPredictionWordBuilder(CharSequence prevWordForBigram,
final ProximityInfo proximityInfo, final int correctionMode) {
- final WordComposer wordComposer = sEmptyWordComposer;
-
LatinImeLogger.onStartSuggestion(prevWordForBigram);
mIsFirstCharCapitalized = false;
mIsAllUpperCase = false;
@@ -272,15 +270,10 @@ public class Suggest implements Dictionary.WordCallback {
collectGarbage(mSuggestions, mPrefMaxSuggestions);
Arrays.fill(mScores, 0);
- final String typedWord = "";
- final String consideredWord = "";
// Treating USER_TYPED as UNIGRAM suggestion for logging now.
- LatinImeLogger.onAddSuggestedWord(typedWord, Suggest.DIC_USER_TYPED,
- Dictionary.UNIGRAM);
+ LatinImeLogger.onAddSuggestedWord("", Suggest.DIC_USER_TYPED, Dictionary.UNIGRAM);
mConsideredWord = "";
- final boolean allowsToBeAutoCorrected = false;
-
if (correctionMode == CORRECTION_FULL_BIGRAM) {
// At first character typed, search only the bigrams
Arrays.fill(mBigramScores, 0);
@@ -292,7 +285,7 @@ public class Suggest implements Dictionary.WordCallback {
prevWordForBigram = lowerPrevWord;
}
for (final Dictionary dictionary : mBigramDictionaries.values()) {
- dictionary.getBigrams(wordComposer, prevWordForBigram, this);
+ dictionary.getBigrams(sEmptyWordComposer, prevWordForBigram, this);
}
// Nothing entered: return all bigrams for the previous word
int insertCount = Math.min(mBigramSuggestions.size(), mPrefMaxSuggestions);
@@ -301,12 +294,11 @@ public class Suggest implements Dictionary.WordCallback {
}
}
}
- CharSequence whitelistedWord = null;
StringUtils.removeDupes(mSuggestions);
return new SuggestedWords.Builder().addWords(mSuggestions, null)
- .setAllowsToBeAutoCorrected(allowsToBeAutoCorrected)
+ .setAllowsToBeAutoCorrected(false)
.setHasAutoCorrection(false);
}