diff options
author | 2014-05-26 18:45:32 +0900 | |
---|---|---|
committer | 2014-05-26 21:56:20 +0900 | |
commit | a6278eb9c1fbe102259cba392b1459f712ca46e7 (patch) | |
tree | 40d1acf7ee7c94baabaa6c17180c18531059ce65 /java/src/com/android/inputmethod/latin/Suggest.java | |
parent | 4905d83270720ce9b9121595277dae6ba8102f16 (diff) | |
download | latinime-a6278eb9c1fbe102259cba392b1459f712ca46e7.tar.gz latinime-a6278eb9c1fbe102259cba392b1459f712ca46e7.tar.xz latinime-a6278eb9c1fbe102259cba392b1459f712ca46e7.zip |
Use whether it's exact match to detect distracters.
Bug: 13142176
Change-Id: Id5b7286d28897931f7bfe571be45d46ffeef4adf
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index eafe597f2..63928e31f 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -127,7 +127,7 @@ public final class Suggest { suggestionResults.first(), suggestionResults.mLocale, isAllUpperCase, isFirstCharCapitalized, trailingSingleQuotesCount); firstSuggestion = firstSuggestedWordInfo.mWord; - if (SuggestedWordInfo.KIND_WHITELIST != firstSuggestedWordInfo.mKind) { + if (!firstSuggestedWordInfo.isKindOf(SuggestedWordInfo.KIND_WHITELIST)) { whitelistedWord = null; } else { whitelistedWord = firstSuggestion; @@ -158,7 +158,7 @@ public final class Suggest { || suggestionResults.isEmpty() || wordComposer.hasDigits() || wordComposer.isMostlyCaps() || wordComposer.isResumed() || !mDictionaryFacilitator.hasInitializedMainDictionary() - || SuggestedWordInfo.KIND_SHORTCUT == suggestionResults.first().mKind) { + || suggestionResults.first().isKindOf(SuggestedWordInfo.KIND_SHORTCUT)) { // If we don't have a main dictionary, we never want to auto-correct. The reason for // this is, the user may have a contact whose name happens to match a valid word in // their language, and it will unexpectedly auto-correct. For example, if the user |