diff options
author | 2012-03-09 18:15:45 +0900 | |
---|---|---|
committer | 2012-03-09 18:44:20 +0900 | |
commit | 0b96bc4b2b9c523c0228ed53e4576518cd7ab3eb (patch) | |
tree | 4cb002ae075cbf4a151a53983e0f1134449ae9ae /java/src | |
parent | 5a61d03f318c2813c75b2c2e7057019f9ad472c7 (diff) | |
download | latinime-0b96bc4b2b9c523c0228ed53e4576518cd7ab3eb.tar.gz latinime-0b96bc4b2b9c523c0228ed53e4576518cd7ab3eb.tar.xz latinime-0b96bc4b2b9c523c0228ed53e4576518cd7ab3eb.zip |
Reduction, step 4
Change-Id: Ib27dc6e9486c3f0f2ec1e94a88a52d12c1af2d38
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 2e88ad4c1..058c8ad74 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -277,15 +277,9 @@ public class Suggest implements Dictionary.WordCallback { // Treating USER_TYPED as UNIGRAM suggestion for logging now. LatinImeLogger.onAddSuggestedWord(typedWord, Suggest.DIC_USER_TYPED, Dictionary.UNIGRAM); - mConsideredWord = consideredWord; + mConsideredWord = ""; - // TODO: Change this scheme - a boolean is not enough. A whitelisted word may be "valid" - // but still autocorrected from - in the case the whitelist only capitalizes the word. - // The whitelist should be case-insensitive, so it's not possible to be consistent with - // a boolean flag. Right now this is handled with a slight hack in - // WhitelistDictionary#shouldForciblyAutoCorrectFrom. - final boolean allowsToBeAutoCorrected = AutoCorrection.allowsToBeAutoCorrected( - getUnigramDictionaries(), consideredWord, false); + final boolean allowsToBeAutoCorrected = false; if (correctionMode == CORRECTION_FULL_BIGRAM) { // At first character typed, search only the bigrams @@ -309,23 +303,11 @@ public class Suggest implements Dictionary.WordCallback { } CharSequence whitelistedWord = null; - final boolean hasAutoCorrection; - if (CORRECTION_FULL == correctionMode - || CORRECTION_FULL_BIGRAM == correctionMode) { - final CharSequence autoCorrection = null; - hasAutoCorrection = (null != autoCorrection); - } else { - hasAutoCorrection = false; - } - - // TODO: SuggestedWords.Builder#addWord will not insert any isEmpty() word, so the - // following is useless - mSuggestions.add(0, typedWord); StringUtils.removeDupes(mSuggestions); return new SuggestedWords.Builder().addWords(mSuggestions, null) .setAllowsToBeAutoCorrected(allowsToBeAutoCorrected) - .setHasAutoCorrection(hasAutoCorrection); + .setHasAutoCorrection(false); } // TODO: cleanup dictionaries looking up and suggestions building with SuggestedWords.Builder |