aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/PointerTracker.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-09-07 01:32:22 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-07 01:32:22 -0700
commitbc1a0354ef1cac0319cab63822c66203f1fa2c24 (patch)
treeaa945aff353d7910bba92305ac9dbdb296dc8c87 /java/src/com/android/inputmethod/latin/PointerTracker.java
parent36d2d0e736605141006108d573614ab3343a0600 (diff)
parent26aff8c62f61f18b1b9a40ce647984284a41c895 (diff)
downloadlatinime-bc1a0354ef1cac0319cab63822c66203f1fa2c24.tar.gz
latinime-bc1a0354ef1cac0319cab63822c66203f1fa2c24.tar.xz
latinime-bc1a0354ef1cac0319cab63822c66203f1fa2c24.zip
am 26aff8c6: Merge "Fixed extra periods when chording with shift and space" into gingerbread
Merge commit '26aff8c62f61f18b1b9a40ce647984284a41c895' into gingerbread-plus-aosp * commit '26aff8c62f61f18b1b9a40ce647984284a41c895': Fixed extra periods when chording with shift and space
Diffstat (limited to 'java/src/com/android/inputmethod/latin/PointerTracker.java')
-rw-r--r--java/src/com/android/inputmethod/latin/PointerTracker.java11
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))