From ad662adeef10c4b202f8f5f80037dd5b8fc9583d Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 13 May 2013 17:05:03 +0900 Subject: [PATCH] Disable delete key repeating while in slide input mode Bug: 8915171 Change-Id: I04f84c29f10abc0207072d2165c75dd20f053f92 --- .../android/inputmethod/keyboard/PointerTracker.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index 5e4b1a58d..71b885c0c 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -1247,10 +1247,13 @@ public final class PointerTracker implements PointerTrackerQueue.Element { } private void startRepeatKey(final Key key) { - if (key != null && key.isRepeatable() && !sInGesture) { - onRegisterKey(key); - mTimerProxy.startKeyRepeatTimer(this); - } + if (sInGesture) return; + if (key == null) return; + if (!key.isRepeatable()) return; + // Don't start key repeat when we are in sliding input mode. + if (mIsInSlidingKeyInputFromModifier) return; + onRegisterKey(key); + mTimerProxy.startKeyRepeatTimer(this); } public void onRegisterKey(final Key key) {