diff options
author | 2012-06-29 02:09:06 -0700 | |
---|---|---|
committer | 2012-06-29 02:09:06 -0700 | |
commit | 7a6ac44f5fcf8b1961ebf4c0c6e72409b2cdb455 (patch) | |
tree | 84199fa065e4bc4442069193f30b8745f6ab823c /java/src | |
parent | e0b7359126f697147f8af9ad85289d2a24c76da7 (diff) | |
parent | deb2d88245ddfda6b8012c9a3a5d95246233fbae (diff) | |
download | latinime-7a6ac44f5fcf8b1961ebf4c0c6e72409b2cdb455.tar.gz latinime-7a6ac44f5fcf8b1961ebf4c0c6e72409b2cdb455.tar.xz latinime-7a6ac44f5fcf8b1961ebf4c0c6e72409b2cdb455.zip |
Merge "Small refactoring (A30)"
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 952296227..24a10964e 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -243,6 +243,10 @@ public class Suggest { } else { hasAutoCorrection = false; } + boolean autoCorrectionAvailable = hasAutoCorrection; + // Don't auto-correct words with multiple capital letter + autoCorrectionAvailable &= !wordComposer.isMostlyCaps(); + autoCorrectionAvailable &= !wordComposer.isResumed(); if (whitelistedWord != null) { suggestionsSet.add(new SuggestedWordInfo(whitelistedWord, @@ -296,10 +300,6 @@ public class Suggest { // always auto-correct to "Will" which is unwanted. Hence, no main dict => no auto-correct. && hasMainDictionary(); - boolean autoCorrectionAvailable = hasAutoCorrection; - // Don't auto-correct words with multiple capital letter - autoCorrectionAvailable &= !wordComposer.isMostlyCaps(); - autoCorrectionAvailable &= !wordComposer.isResumed(); return new SuggestedWords(suggestionsList, // TODO: this first argument is lying. If this is a whitelisted word which is an // actual word, it says typedWordValid = false, which looks wrong. We should either |