aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/MainKeyboardView.java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/MainKeyboardView.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
index 4ed0f58e1..f5c1b7a0c 100644
--- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
@@ -142,12 +142,14 @@ public class MainKeyboardView extends KeyboardView implements PointerTracker.Key
private static final int MSG_REPEAT_KEY = 1;
private static final int MSG_LONGPRESS_KEY = 2;
private static final int MSG_DOUBLE_TAP = 3;
+ private static final int MSG_DISABLE_GESTURE_EXPIRED = 4;
private final int mKeyRepeatStartTimeout;
private final int mKeyRepeatInterval;
private final int mLongPressKeyTimeout;
private final int mLongPressShiftKeyTimeout;
private final int mIgnoreAltCodeKeyTimeout;
+ private final int mDisableGestureWhileFastTypingTimeout;
public KeyTimerHandler(final MainKeyboardView outerInstance,
final TypedArray mainKeyboardViewAttr) {
@@ -163,6 +165,8 @@ public class MainKeyboardView extends KeyboardView implements PointerTracker.Key
R.styleable.MainKeyboardView_longPressShiftKeyTimeout, 0);
mIgnoreAltCodeKeyTimeout = mainKeyboardViewAttr.getInt(
R.styleable.MainKeyboardView_ignoreAltCodeKeyTimeout, 0);
+ mDisableGestureWhileFastTypingTimeout = mainKeyboardViewAttr.getInt(
+ R.styleable.MainKeyboardView_disableGestureWhileFastTypingTimeout, 0);
}
@Override
@@ -187,6 +191,9 @@ public class MainKeyboardView extends KeyboardView implements PointerTracker.Key
KeyboardSwitcher.getInstance().onLongPressTimeout(msg.arg1);
}
break;
+ case MSG_DISABLE_GESTURE_EXPIRED:
+ PointerTracker.clearGestureOffWhileFastTyping();
+ break;
}
}
@@ -312,6 +319,14 @@ public class MainKeyboardView extends KeyboardView implements PointerTracker.Key
}
@Override
+ public void startGestureOffWhileFastTypingTimer() {
+ removeMessages(MSG_DISABLE_GESTURE_EXPIRED);
+ PointerTracker.setGestureOffWhileFastTyping();
+ sendMessageDelayed(obtainMessage(MSG_DISABLE_GESTURE_EXPIRED),
+ mDisableGestureWhileFastTypingTimeout);
+ }
+
+ @Override
public void startDoubleTapTimer() {
sendMessageDelayed(obtainMessage(MSG_DOUBLE_TAP),
ViewConfiguration.getDoubleTapTimeout());