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:30:23 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-09-13 02:30:23 -0700
commita0fd2b4053b338576e8e706067b921f8f9c1ee76 (patch)
tree17226c0313fef5ef0fd897787dbc80582481962e /java/src/com/android/inputmethod/latin/LatinIME.java
parentf5297a2b615d98ebf178fb74c42c7349ac8f3e9f (diff)
parent378728920bec5e43138573acb8473093e674fde9 (diff)
downloadlatinime-a0fd2b4053b338576e8e706067b921f8f9c1ee76.tar.gz
latinime-a0fd2b4053b338576e8e706067b921f8f9c1ee76.tar.xz
latinime-a0fd2b4053b338576e8e706067b921f8f9c1ee76.zip
am 37872892: Merge "Make onUpdateSelection much more resilient to race conditions." into jb-mr1-dev
* commit '378728920bec5e43138573acb8473093e674fde9': Make onUpdateSelection much more resilient to race conditions.
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