aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Suggest.java
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-05-26 13:53:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-26 13:53:19 +0000
commit0088d1f6683fce0175266b90c3ec04f15ad8daeb (patch)
treea95613d6030b1a54458307e074f872f71bf87b97 /java/src/com/android/inputmethod/latin/Suggest.java
parent67e02a6aaa2b693f92f0f3f7948c3f8dadfc17e6 (diff)
parenta6278eb9c1fbe102259cba392b1459f712ca46e7 (diff)
downloadlatinime-0088d1f6683fce0175266b90c3ec04f15ad8daeb.tar.gz
latinime-0088d1f6683fce0175266b90c3ec04f15ad8daeb.tar.xz
latinime-0088d1f6683fce0175266b90c3ec04f15ad8daeb.zip
Merge "Use whether it's exact match to detect distracters."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java4
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