From 9701b360d9a44a06a20554e8998007a614b1622d Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Thu, 28 Jun 2012 16:30:17 +0900 Subject: [PATCH] Rename a terribly-named method for clarity (A11) Change-Id: Id180000404dc6929d80f98c0e9cd2026230ad2d1 --- java/src/com/android/inputmethod/latin/AutoCorrection.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java index 739b236bb..5c7bc13a3 100644 --- a/java/src/com/android/inputmethod/latin/AutoCorrection.java +++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java @@ -38,7 +38,7 @@ public class AutoCorrection { final CharSequence whitelistedWord) { if (hasAutoCorrectionForWhitelistedWord(whitelistedWord)) { return whitelistedWord; - } else if (hasAutoCorrectionForConsideredWord( + } else if (shouldAutoCorrectToSelf( dictionaries, wordComposer, suggestion, consideredWord)) { return consideredWord; } else if (hasAutoCorrectionForBinaryDictionary(wordComposer, suggestion, @@ -91,6 +91,7 @@ public class AutoCorrection { return maxFreq; } + // Returns true if this is a whitelist entry, or it isn't in any dictionary. public static boolean allowsToBeAutoCorrected( final ConcurrentHashMap dictionaries, final CharSequence word, final boolean ignoreCase) { @@ -108,7 +109,7 @@ public class AutoCorrection { return whiteListedWord != null; } - private static boolean hasAutoCorrectionForConsideredWord( + private static boolean shouldAutoCorrectToSelf( final ConcurrentHashMap dictionaries, final WordComposer wordComposer, final SuggestedWordInfo suggestion, final CharSequence consideredWord) {