aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Suggest.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java26
1 files changed, 12 insertions, 14 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 9bbc5314f..62cce1e70 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -227,20 +227,18 @@ public class Suggest {
mWhiteListDictionary.getWhitelistedWord(consideredWord);
final boolean hasAutoCorrection;
- if (isCorrectionEnabled) {
- if (null != whitelistedWord) {
- hasAutoCorrection = true;
- } else if (!AutoCorrection.isWhitelistedOrNotAWord(
- mDictionaries, consideredWord, false)) {
- hasAutoCorrection = true;
- } else if (suggestionsSet.isEmpty()) {
- hasAutoCorrection = false;
- } else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(suggestionsSet.first(),
- consideredWord, mAutoCorrectionThreshold)) {
- hasAutoCorrection = true;
- } else {
- hasAutoCorrection = false;
- }
+ if (!isCorrectionEnabled) {
+ hasAutoCorrection = false;
+ } else if (null != whitelistedWord) {
+ hasAutoCorrection = true;
+ } else if (!AutoCorrection.isWhitelistedOrNotAWord(
+ mDictionaries, consideredWord, false)) {
+ hasAutoCorrection = true;
+ } else if (suggestionsSet.isEmpty()) {
+ hasAutoCorrection = false;
+ } else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(suggestionsSet.first(),
+ consideredWord, mAutoCorrectionThreshold)) {
+ hasAutoCorrection = true;
} else {
hasAutoCorrection = false;
}