diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java index 91e1dddec..6344e5887 100644 --- a/java/src/com/android/inputmethod/latin/AutoCorrection.java +++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java @@ -88,10 +88,6 @@ public class AutoCorrection { return !isValidWord(dictionaries, word, ignoreCase); } - static public boolean hasAutoCorrectionForWhitelistedWord(CharSequence whiteListedWord) { - return whiteListedWord != null; - } - public static boolean shouldAutoCorrectToSelf( final ConcurrentHashMap dictionaries, final CharSequence consideredWord) { diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 195c19b4d..ed009375e 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -231,7 +231,7 @@ public class Suggest { final SuggestedWordInfo bestSuggestion = suggestionsSet.isEmpty() ? null : suggestionsSet.first(); final CharSequence autoCorrection; - if (AutoCorrection.hasAutoCorrectionForWhitelistedWord(whitelistedWord)) { + if (null != whitelistedWord) { autoCorrection = whitelistedWord; } else if (AutoCorrection.shouldAutoCorrectToSelf(mDictionaries, consideredWord)) { autoCorrection = consideredWord;