am eabb710b: am f224941c: Merge "Suppress calling onPressKey and onReleaseKey while detecting gesture"

* commit 'eabb710b60c50b58a105bf9cbb6c7987ccdae6ee':
  Suppress calling onPressKey and onReleaseKey while detecting gesture
main
Tadashi G. Takaoka 2013-04-17 19:47:04 -07:00 committed by Android Git Automerger
commit 333bb7dbbd
1 changed files with 2 additions and 2 deletions

View File

@ -441,7 +441,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
// Returns true if keyboard has been changed by this callback. // Returns true if keyboard has been changed by this callback.
private boolean callListenerOnPressAndCheckKeyboardLayoutChange(final Key key) { private boolean callListenerOnPressAndCheckKeyboardLayoutChange(final Key key) {
if (sInGesture) { if (sInGesture || mIsDetectingGesture) {
return false; return false;
} }
final boolean ignoreModifierKey = mIsInSlidingKeyInputFromModifier && key.isModifier(); final boolean ignoreModifierKey = mIsInSlidingKeyInputFromModifier && key.isModifier();
@ -500,7 +500,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
// primaryCode is different from {@link Key#mCode}. // primaryCode is different from {@link Key#mCode}.
private void callListenerOnRelease(final Key key, final int primaryCode, private void callListenerOnRelease(final Key key, final int primaryCode,
final boolean withSliding) { final boolean withSliding) {
if (sInGesture) { if (sInGesture || mIsDetectingGesture) {
return; return;
} }
final boolean ignoreModifierKey = mIsInSlidingKeyInputFromModifier && key.isModifier(); final boolean ignoreModifierKey = mIsInSlidingKeyInputFromModifier && key.isModifier();