aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-09-13 02:28:51 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-13 02:28:52 -0700
commit378728920bec5e43138573acb8473093e674fde9 (patch)
tree17226c0313fef5ef0fd897787dbc80582481962e /java/src/com/android/inputmethod/latin/LatinIME.java
parent0e301bdc294b4a22688e486b4570948ff98b9ccf (diff)
parent5ed88457bf9ef3305d4a5aa4ac05b513433ad0dd (diff)
downloadlatinime-378728920bec5e43138573acb8473093e674fde9.tar.gz
latinime-378728920bec5e43138573acb8473093e674fde9.tar.xz
latinime-378728920bec5e43138573acb8473093e674fde9.zip
Merge "Make onUpdateSelection much more resilient to race conditions." into jb-mr1-dev
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 78c65e0c7..b3f7e674d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -825,7 +825,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// we know for sure the cursor moved while we were composing and we should reset
// the state.
final boolean noComposingSpan = composingSpanStart == -1 && composingSpanEnd == -1;
- if (!mExpectingUpdateSelection) {
+ if (!mExpectingUpdateSelection
+ && !mConnection.isBelatedExpectedUpdate(oldSelStart, newSelStart)) {
// 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