Rename a terribly-named method for clarity (A11)

Change-Id: Id180000404dc6929d80f98c0e9cd2026230ad2d1
main
Jean Chalard 2012-06-28 16:30:17 +09:00
parent 6b911c27a3
commit 9701b360d9
1 changed files with 3 additions and 2 deletions

View File

@ -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<String, Dictionary> 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<String, Dictionary> dictionaries,
final WordComposer wordComposer, final SuggestedWordInfo suggestion,
final CharSequence consideredWord) {