aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Suggest.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-06-28 18:37:34 +0900
committerJean Chalard <jchalard@google.com>2012-06-29 17:00:57 +0900
commit2cda148fd5aa047dca6dfd5d78db548a7a8e2bc0 (patch)
tree73b0b11d6d0d283f441c03f2a80aaedddd3d38a2 /java/src/com/android/inputmethod/latin/Suggest.java
parentdeb2d88245ddfda6b8012c9a3a5d95246233fbae (diff)
downloadlatinime-2cda148fd5aa047dca6dfd5d78db548a7a8e2bc0.tar.gz
latinime-2cda148fd5aa047dca6dfd5d78db548a7a8e2bc0.tar.xz
latinime-2cda148fd5aa047dca6dfd5d78db548a7a8e2bc0.zip
Simplification (A31)
Change-Id: I9e4d030974ccec1a6256de6ca87610870e404149
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 24a10964e..0af08084f 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -227,7 +227,7 @@ public class Suggest {
mWhiteListDictionary.getWhitelistedWord(consideredWord);
final boolean hasAutoCorrection;
- if (!isCorrectionEnabled) {
+ if (!isCorrectionEnabled || wordComposer.isMostlyCaps() || wordComposer.isResumed()) {
hasAutoCorrection = false;
} else if (null != whitelistedWord) {
hasAutoCorrection = true;
@@ -243,10 +243,6 @@ 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,
@@ -305,7 +301,7 @@ public class Suggest {
// actual word, it says typedWordValid = false, which looks wrong. We should either
// rename the attribute or change the value.
!isPrediction && !allowsToBeAutoCorrected /* typedWordValid */,
- !isPrediction && autoCorrectionAvailable /* hasAutoCorrectionCandidate */,
+ !isPrediction && hasAutoCorrection, /* hasAutoCorrectionCandidate */
false /* isPunctuationSuggestions */,
false /* isObsoleteSuggestions */,
isPrediction);