Inline a simple method (A15)
Change-Id: Ib74fcbf33c680bf02c39a9896e30e3afbcfd149a
This commit is contained in:
parent
074c90af98
commit
a96a11949f
2 changed files with 1 additions and 5 deletions
|
@ -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<String, Dictionary> dictionaries,
|
||||
final CharSequence consideredWord) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue