diff options
author | 2010-09-07 12:20:03 +0900 | |
---|---|---|
committer | 2010-09-07 17:29:09 +0900 | |
commit | 6252f468bc1306f71c9933f65b116dbbb5530de8 (patch) | |
tree | 39c9a9d5664e725d7e106c1e8d0c2a745607dcf1 /java/src/com/android/inputmethod/latin/PointerTracker.java | |
parent | 8d7ffcb2ac3a8cdd051c7e493ff17b6bf1ded9c0 (diff) | |
download | latinime-6252f468bc1306f71c9933f65b116dbbb5530de8.tar.gz latinime-6252f468bc1306f71c9933f65b116dbbb5530de8.tar.xz latinime-6252f468bc1306f71c9933f65b116dbbb5530de8.zip |
Fixed extra periods when chording with shift and space
Actually it was caused by canceling repeat key (space and delete) when
multiple pointer are touching.
Bug: 2975041
Change-Id: If82183b9225efdace7b5418860b9664f1705b7ec
Diffstat (limited to 'java/src/com/android/inputmethod/latin/PointerTracker.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/PointerTracker.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/PointerTracker.java b/java/src/com/android/inputmethod/latin/PointerTracker.java index 1f6005621..f849158ae 100644 --- a/java/src/com/android/inputmethod/latin/PointerTracker.java +++ b/java/src/com/android/inputmethod/latin/PointerTracker.java @@ -65,6 +65,9 @@ public class PointerTracker { // true if event is already translated to a key action (long press or mini-keyboard) private boolean mKeyAlreadyProcessed; + // true if this pointer is repeatable key + private boolean mIsRepeatableKey; + // for move de-bouncing private int mLastCodeX; private int mLastCodeY; @@ -176,6 +179,7 @@ public class PointerTracker { mStartY = y; mDownTime = eventTime; mKeyAlreadyProcessed = false; + mIsRepeatableKey = false; startMoveDebouncing(x, y); startTimeDebouncing(eventTime); checkMultiTap(eventTime, keyIndex); @@ -187,6 +191,7 @@ public class PointerTracker { if (mKeys[keyIndex].repeatable) { repeatKey(keyIndex); mHandler.startKeyRepeatTimer(REPEAT_START_DELAY, keyIndex, this); + mIsRepeatableKey = true; } mHandler.startLongPressTimer(LONGPRESS_TIMEOUT, keyIndex, this); } @@ -246,10 +251,9 @@ public class PointerTracker { return; if (DEBUG) debugLog("onUpEvent :", x, y); - int keyIndex = mKeyDetector.getKeyIndexAndNearbyCodes(x, y, null); - boolean wasInKeyRepeat = mHandler.isInKeyRepeat(); mHandler.cancelKeyTimers(); mHandler.cancelPopupPreview(); + int keyIndex = mKeyDetector.getKeyIndexAndNearbyCodes(x, y, null); if (isMinorMoveBounce(x, y, keyIndex, mCurrentKey)) { updateTimeDebouncing(eventTime); } else { @@ -263,8 +267,7 @@ public class PointerTracker { y = mLastCodeY; } showKeyPreviewAndUpdateKey(NOT_A_KEY); - // If we're not on a repeating key (which sends on a DOWN event) - if (!wasInKeyRepeat) { + if (!mIsRepeatableKey) { detectAndSendKey(mCurrentKey, x, y, eventTime); } if (isValidKeyIndex(keyIndex)) |