From a91da766837dcc5fc80efe5cd58509eaea84e6d5 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 15 Apr 2013 10:59:54 +0900 Subject: [PATCH] Suppress calling onPressKey and onReleaseKey while detecting gesture Bug: 8284624 Change-Id: I14470bb2373965aefa921b2c94948450bfa438e3 --- java/src/com/android/inputmethod/keyboard/PointerTracker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index dcfae739e..2ec6e2049 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -441,7 +441,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element { // Returns true if keyboard has been changed by this callback. private boolean callListenerOnPressAndCheckKeyboardLayoutChange(final Key key) { - if (sInGesture) { + if (sInGesture || mIsDetectingGesture) { return false; } final boolean ignoreModifierKey = mIsInSlidingKeyInputFromModifier && key.isModifier(); @@ -500,7 +500,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element { // primaryCode is different from {@link Key#mCode}. private void callListenerOnRelease(final Key key, final int primaryCode, final boolean withSliding) { - if (sInGesture) { + if (sInGesture || mIsDetectingGesture) { return; } final boolean ignoreModifierKey = mIsInSlidingKeyInputFromModifier && key.isModifier();