aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-06-28 17:07:30 +0900
committerJean Chalard <jchalard@google.com>2012-06-29 15:44:55 +0900
commitea578f6b1dbcf04ffcc9c673f72a38ed2cfecdfc (patch)
tree132787ec0007d6e447f7a709afed9a96a7a2d679 /java/src
parent19d02c19d0af940af358f6f91abb314330a3c60e (diff)
downloadlatinime-ea578f6b1dbcf04ffcc9c673f72a38ed2cfecdfc.tar.gz
latinime-ea578f6b1dbcf04ffcc9c673f72a38ed2cfecdfc.tar.xz
latinime-ea578f6b1dbcf04ffcc9c673f72a38ed2cfecdfc.zip
Revert a test for readability (A22)
Change-Id: I1df4cef5ae2736a22273843dce67f0012181bfd3
Diffstat (limited to 'java/src')
-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;
}