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:56:18 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-26 13:56:18 +0000
commit1dab0693d2d993168beae6a3b696297811e959e0 (patch)
treea95613d6030b1a54458307e074f872f71bf87b97 /java/src/com/android/inputmethod/latin/Suggest.java
parentc96a7901941732e3b2f814d1a3a68ba9116b2172 (diff)
parent0088d1f6683fce0175266b90c3ec04f15ad8daeb (diff)
downloadlatinime-1dab0693d2d993168beae6a3b696297811e959e0.tar.gz
latinime-1dab0693d2d993168beae6a3b696297811e959e0.tar.xz
latinime-1dab0693d2d993168beae6a3b696297811e959e0.zip
am 0088d1f6: Merge "Use whether it\'s exact match to detect distracters."
* commit '0088d1f6683fce0175266b90c3ec04f15ad8daeb': 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