From a96a11949fc396a2b2e65071a972062bb435cf74 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Thu, 28 Jun 2012 16:56:26 +0900 Subject: [PATCH] Inline a simple method (A15) Change-Id: Ib74fcbf33c680bf02c39a9896e30e3afbcfd149a --- java/src/com/android/inputmethod/latin/AutoCorrection.java | 4 ---- java/src/com/android/inputmethod/latin/Suggest.java | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java index 91e1dddec..6344e5887 100644 --- a/java/src/com/android/inputmethod/latin/AutoCorrection.java +++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java @@ -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 dictionaries, final CharSequence consideredWord) { diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 195c19b4d..ed009375e 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -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;