Skip to content
Snippets Groups Projects
Commit 739683dc authored by Jean Chalard's avatar Jean Chalard
Browse files

Rename a method for readability (A19)

Change-Id: I0b8c06d1fd0bfb3caf363c048acc7048abed1752
parent 31b346aa
No related branches found
No related tags found
No related merge requests found
......@@ -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 =
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment