aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-09-24 09:36:33 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-09-24 09:36:33 -0700
commite5aeaebefa643e0604b1c907273964d022e4e257 (patch)
tree2a9504d63748541cc7bd2dd1fe426f747a89beaf /java/src
parente6f4d070a78fb9e7e1a51ef8030d73e0c04b02c7 (diff)
parent57fc12adb39ec2391f588c4b8507d3f17e4979f5 (diff)
downloadlatinime-e5aeaebefa643e0604b1c907273964d022e4e257.tar.gz
latinime-e5aeaebefa643e0604b1c907273964d022e4e257.tar.xz
latinime-e5aeaebefa643e0604b1c907273964d022e4e257.zip
am 57fc12ad: am 65ef2608: Merge "Fix a race condition with shift" into jb-mr1-dev
* commit '57fc12adb39ec2391f588c4b8507d3f17e4979f5': Fix a race condition with shift
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 9252b0980..b77eef412 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -856,7 +856,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// TODO: the following is probably better done in resetEntireInputState().
// it should only happen when the cursor moved, and the very purpose of the
// test below is to narrow down whether this happened or not. Likewise with
- // the call to postUpdateShiftState.
+ // the call to updateShiftState.
// We set this to NONE because after a cursor move, we don't want the space
// state-related special processing to kick in.
mSpaceState = SPACE_STATE_NONE;
@@ -865,7 +865,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
resetEntireInputState(newSelStart);
}
- mHandler.postUpdateShiftState();
+ mKeyboardSwitcher.updateShiftState();
}
mExpectingUpdateSelection = false;
// TODO: Decide to call restartSuggestionsOnWordBeforeCursorIfAtEndOfWord() or not
@@ -1551,7 +1551,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
private void handleBackspace(final int spaceState) {
- // In many cases, we may have to put the keyboard in auto-shift state again.
+ // In many cases, we may have to put the keyboard in auto-shift state again. However
+ // we want to wait a few milliseconds before doing it to avoid the keyboard flashing
+ // during key repeat.
mHandler.postUpdateShiftState();
if (mWordComposer.isComposingWord()) {
@@ -1791,7 +1793,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
Utils.Stats.onSeparator((char)primaryCode, x, y);
}
- mHandler.postUpdateShiftState();
+ mKeyboardSwitcher.updateShiftState();
return didAutoCorrect;
}