Inline a simple method (A15)

Change-Id: Ib74fcbf33c680bf02c39a9896e30e3afbcfd149a
This commit is contained in:
Jean Chalard 2012-06-28 16:56:26 +09:00
parent 074c90af98
commit a96a11949f
2 changed files with 1 additions and 5 deletions

View file

@ -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) {

View file

@ -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;