diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java index 5c7bc13a3..3699938c2 100644 --- a/java/src/com/android/inputmethod/latin/AutoCorrection.java +++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java @@ -38,8 +38,7 @@ public class AutoCorrection { final CharSequence whitelistedWord) { if (hasAutoCorrectionForWhitelistedWord(whitelistedWord)) { return whitelistedWord; - } else if (shouldAutoCorrectToSelf( - dictionaries, wordComposer, suggestion, consideredWord)) { + } else if (shouldAutoCorrectToSelf(dictionaries, wordComposer, consideredWord)) { return consideredWord; } else if (hasAutoCorrectionForBinaryDictionary(wordComposer, suggestion, consideredWord, autoCorrectionThreshold)) { @@ -111,10 +110,9 @@ public class AutoCorrection { private static boolean shouldAutoCorrectToSelf( final ConcurrentHashMap dictionaries, - final WordComposer wordComposer, final SuggestedWordInfo suggestion, - final CharSequence consideredWord) { + final WordComposer wordComposer, final CharSequence consideredWord) { if (TextUtils.isEmpty(consideredWord)) return false; - return wordComposer.size() > 1 && null != suggestion + return wordComposer.size() > 1 && !allowsToBeAutoCorrected(dictionaries, consideredWord, false); }