aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-02-28 04:27:47 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-28 04:27:47 -0800
commit0797c0039b1033b3bbd216520318e497752f452e (patch)
treecd301ee14338742f645504728f8e45f293c99c9f /java/src/com/android/inputmethod/latin
parenta222053f7ffd7bc82c9c3871f6a82041c4ef117a (diff)
parent858045b41c589e178bef8b8269bb423f231f77e6 (diff)
downloadlatinime-0797c0039b1033b3bbd216520318e497752f452e.tar.gz
latinime-0797c0039b1033b3bbd216520318e497752f452e.tar.xz
latinime-0797c0039b1033b3bbd216520318e497752f452e.zip
am 858045b4: Merge "Fix: wrong auto correction for whilelist and personalized words."
* commit '858045b41c589e178bef8b8269bb423f231f77e6': Fix: wrong auto correction for whilelist and personalized words.
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index e77cce0d4..f0e7d2f61 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -142,8 +142,8 @@ public final class Suggest {
whitelistedWord = firstSuggestion = null;
} else {
final SuggestedWordInfo firstSuggestedWordInfo = getTransformedSuggestedWordInfo(
- suggestionsSet.first(), mLocale, isAllUpperCase, isFirstCharCapitalized,
- trailingSingleQuotesCount);
+ suggestionsSet.first(), mLocale, isAllUpperCase, isFirstCharCapitalized,
+ trailingSingleQuotesCount);
firstSuggestion = firstSuggestedWordInfo.mWord;
if (SuggestedWordInfo.KIND_WHITELIST != firstSuggestedWordInfo.mKind) {
whitelistedWord = null;
@@ -161,10 +161,10 @@ public final class Suggest {
// TODO: stop relying on indices to find where is the auto-correction in the suggested
// words, and correct this test.
final boolean allowsToBeAutoCorrected = (null != whitelistedWord
- && !whitelistedWord.equals(consideredWord))
+ && !whitelistedWord.equals(typedWord))
|| (consideredWord.length() > 1 && !mDictionaryFacilitator.isValidWord(
consideredWord, wordComposer.isFirstCharCapitalized())
- && !consideredWord.equals(firstSuggestion));
+ && !typedWord.equals(firstSuggestion));
final boolean hasAutoCorrection;
// TODO: using isCorrectionEnabled here is not very good. It's probably useless, because