diff options
author | 2012-01-12 11:01:01 +0900 | |
---|---|---|
committer | 2012-01-12 11:16:51 +0900 | |
commit | cd2286fff1ce0aaa5e3f60e55afba2299101207c (patch) | |
tree | c4cad458b8861154e7d3c19717e775c0ac110720 /java | |
parent | 8c111043b8e08d3b058f7508d23b5e6c078c7534 (diff) | |
download | latinime-cd2286fff1ce0aaa5e3f60e55afba2299101207c.tar.gz latinime-cd2286fff1ce0aaa5e3f60e55afba2299101207c.tar.xz latinime-cd2286fff1ce0aaa5e3f60e55afba2299101207c.zip |
Fix a bug where last candidate would not be reset
Bug: 5851148
Change-Id: Ic270318842d8e16bc62d78d5fe0d6be0ca1fb532
Diffstat (limited to 'java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 4cb60558c..b02aec832 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -850,6 +850,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar || newSelEnd != candidatesEnd) && mLastSelectionStart != newSelStart; final boolean candidatesCleared = candidatesStart == -1 && candidatesEnd == -1; if (!mExpectingUpdateSelection) { + // TAKE CARE: there is a race condition when we enter this test even when the user + // did not explicitly move the cursor. This happens when typing fast, where two keys + // turn this flag on in succession and both onUpdateSelection() calls arrive after + // the second one - the first call successfully avoids this test, but the second one + // enters. For the moment we rely on candidatesCleared to further reduce the impact. if (SPACE_STATE_WEAK == mSpaceState) { // Test for no WEAK_SPACE action because there is a race condition that may end up // in coming here on a normal key press. We set this to NONE because after @@ -869,6 +874,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mComposingStateManager.onFinishComposingText(); mVoiceProxy.setVoiceInputHighlighted(false); } else if (!mWordComposer.isComposingWord()) { + mWordComposer.reset(); updateSuggestions(); } } |