diff options
author | 2012-01-11 21:49:01 -0800 | |
---|---|---|
committer | 2012-01-11 21:49:01 -0800 | |
commit | ae2a4eedd22d73ecae680d022972dcaacb7c6702 (patch) | |
tree | a8235dbb69744d8f98b0cc30c737e7a9f23b7f38 /java/src | |
parent | 04184c80989d5c93a7f456411a6394694f3a9608 (diff) | |
parent | ab34a4a7f53e1426a5cc4cd7a7fefde38a82e499 (diff) | |
download | latinime-ae2a4eedd22d73ecae680d022972dcaacb7c6702.tar.gz latinime-ae2a4eedd22d73ecae680d022972dcaacb7c6702.tar.xz latinime-ae2a4eedd22d73ecae680d022972dcaacb7c6702.zip |
am ab34a4a7: Merge "Fix a bug where last candidate would not be reset"
* commit 'ab34a4a7f53e1426a5cc4cd7a7fefde38a82e499':
Fix a bug where last candidate would not be reset
Diffstat (limited to 'java/src')
-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 d5d1fe862..59de798d8 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(); } } |