diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java index 0d90b1cbce21e83e59130e4b96b16aecb8818269..4519abc557ca5c50035f4e252ac7cf3da60491bc 100644 --- a/java/src/com/android/inputmethod/latin/AutoCorrection.java +++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java @@ -75,7 +75,7 @@ public class AutoCorrection { } // Returns true if this is a whitelist entry, or it isn't in any dictionary. - public static boolean allowsToBeAutoCorrected( + public static boolean isWhitelistedOrNotAWord( final ConcurrentHashMap<String, Dictionary> dictionaries, final CharSequence word, final boolean ignoreCase) { final WhitelistDictionary whitelistDictionary = diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index fda20953ffa6b7df5c9e52c0b7c31e804ac5c379..bf3d9c45d10b000f338cd7c746e6fb380d9c59c9 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -233,7 +233,7 @@ public class Suggest { final CharSequence autoCorrection; if (null != whitelistedWord) { autoCorrection = whitelistedWord; - } else if (!AutoCorrection.allowsToBeAutoCorrected( + } else if (!AutoCorrection.isWhitelistedOrNotAWord( mDictionaries, consideredWord, false)) { autoCorrection = consideredWord; } else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(bestSuggestion, @@ -290,7 +290,7 @@ public class Suggest { // The whitelist should be case-insensitive, so it's not possible to be consistent with // a boolean flag. Right now this is handled with a slight hack in // WhitelistDictionary#shouldForciblyAutoCorrectFrom. - final boolean allowsToBeAutoCorrected = AutoCorrection.allowsToBeAutoCorrected( + final boolean allowsToBeAutoCorrected = AutoCorrection.isWhitelistedOrNotAWord( getUnigramDictionaries(), consideredWord, wordComposer.isFirstCharCapitalized()) // 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