aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-09-13 14:11:24 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-09-13 14:11:24 -0700
commitd666c125bc82137b0ccd321d9c0e2c289f38d8a1 (patch)
tree17226c0313fef5ef0fd897787dbc80582481962e /java/src/com/android/inputmethod/latin/LatinIME.java
parentc445a32b12465e98334b26f39dbae248c87c176d (diff)
parenta0fd2b4053b338576e8e706067b921f8f9c1ee76 (diff)
downloadlatinime-d666c125bc82137b0ccd321d9c0e2c289f38d8a1.tar.gz
latinime-d666c125bc82137b0ccd321d9c0e2c289f38d8a1.tar.xz
latinime-d666c125bc82137b0ccd321d9c0e2c289f38d8a1.zip
am a0fd2b40: am 37872892: Merge "Make onUpdateSelection much more resilient to race conditions." into jb-mr1-dev
* commit 'a0fd2b4053b338576e8e706067b921f8f9c1ee76': Make onUpdateSelection much more resilient to race conditions.
Diffstat (limited to '')
-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