aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-01-21 15:03:09 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-01-21 15:52:35 +0900
commitf3df63a93a8f623e2aca5895ee749bd297b58d12 (patch)
tree8750b29c7c19ad99d428be227b5a7cb811d54680 /java/src/com/android/inputmethod/latin/LatinIME.java
parentdbc61779858dbb209059748e2c4eb0e6b228090c (diff)
downloadlatinime-f3df63a93a8f623e2aca5895ee749bd297b58d12.tar.gz
latinime-f3df63a93a8f623e2aca5895ee749bd297b58d12.tar.xz
latinime-f3df63a93a8f623e2aca5895ee749bd297b58d12.zip
Update suggestions if user typed word is found in dictionary
This change aslo eliminates duplicate suggestion from past suggestions. And call setTypedWordVaild to past suggestions. Bug: 3367722 Change-Id: I7ffaa2f7e4e30b3951b6c2df002d269671c9d654
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 053bf6c1a..04cb89177 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1535,10 +1535,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Basically, we update the suggestion strip only when suggestion count > 1. However,
// there is an exception: We update the suggestion strip whenever typed word's length
- // is 1, regardless of suggestion count. Actually, in most cases, suggestion count is 1
- // when typed word's length is 1, but we do always need to clear the previous state when
- // the user starts typing a word (i.e. typed word's length == 1).
- if (typedWord.length() == 1 || builder.size() > 1
+ // is 1 or typed word is found in dictionary, regardless of suggestion count. Actually,
+ // in most cases, suggestion count is 1 when typed word's length is 1, but we do always
+ // need to clear the previous state when the user starts typing a word (i.e. typed word's
+ // length == 1).
+ if (builder.size() > 1 || typedWord.length() == 1 || typedWordValid
|| mCandidateView.isShowingAddToDictionaryHint()) {
builder.setTypedWordValid(typedWordValid).setHasMinimalSuggestion(correctionAvailable);
} else {