mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Inline a simple method (A15)
Change-Id: Ib74fcbf33c680bf02c39a9896e30e3afbcfd149a
This commit is contained in:
parent
074c90af98
commit
a96a11949f
@ -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 New Issue
Block a user