aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-06-28 17:03:13 +0900
committerJean Chalard <jchalard@google.com>2012-06-29 15:12:51 +0900
commit739683dcfb27c68b88eeacdfd486812321fc6b5a (patch)
tree8d1112cf53cfd4715e2d24aa9dd575b531b63024 /java/src
parent31b346aac6dc04a2445a17d156906cc308c7e0d4 (diff)
downloadlatinime-739683dcfb27c68b88eeacdfd486812321fc6b5a.tar.gz
latinime-739683dcfb27c68b88eeacdfd486812321fc6b5a.tar.xz
latinime-739683dcfb27c68b88eeacdfd486812321fc6b5a.zip
Rename a method for readability (A19)
Change-Id: I0b8c06d1fd0bfb3caf363c048acc7048abed1752
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/AutoCorrection.java2
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java
index 0d90b1cbc..4519abc55 100644
--- a/java/src/com/android/inputmethod/latin/AutoCorrection.java
+++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java
@@ -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 =
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index fda20953f..bf3d9c45d 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -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