aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Suggest.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2010-03-24 16:44:31 -0700
committerAmith Yamasani <yamasani@google.com>2010-03-24 19:31:49 -0700
commit0c05902e331b03426754a1cfffe28d185dd8338c (patch)
tree2d65f29bc938b3eef7c7d65ca03221b710da5d3b /java/src/com/android/inputmethod/latin/Suggest.java
parent4ff60be170872503cca0275ef3488b7379b5311b (diff)
downloadlatinime-0c05902e331b03426754a1cfffe28d185dd8338c.tar.gz
latinime-0c05902e331b03426754a1cfffe28d185dd8338c.tar.xz
latinime-0c05902e331b03426754a1cfffe28d185dd8338c.zip
Don't auto-add when in suggest-only mode. Bug: 2521344
Also don't highlight quickfixes when in suggest-only mode In general, reduce the situations where words are auto-added. It was too eagerly adding even words that were in the dictionary.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rwxr-xr-xjava/src/com/android/inputmethod/latin/Suggest.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index b44717d0a..14899e84e 100755
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -346,11 +346,10 @@ public class Suggest implements Dictionary.WordCallback {
if (word == null || word.length() == 0) {
return false;
}
- return (mCorrectionMode == CORRECTION_FULL && mMainDict.isValidWord(word))
- || (mCorrectionMode > CORRECTION_NONE &&
- ((mUserDictionary != null && mUserDictionary.isValidWord(word)))
- || (mAutoDictionary != null && mAutoDictionary.isValidWord(word))
- || (mContactsDictionary != null && mContactsDictionary.isValidWord(word)));
+ return mMainDict.isValidWord(word)
+ || (mUserDictionary != null && mUserDictionary.isValidWord(word))
+ || (mAutoDictionary != null && mAutoDictionary.isValidWord(word))
+ || (mContactsDictionary != null && mContactsDictionary.isValidWord(word));
}
private void collectGarbage() {