From 245b453733d0b611960844d939e0013f285a5a9a Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sun, 7 Oct 2012 20:16:54 -0700 Subject: [PATCH] Properly handle cancel event in GlowPadView There was a workaround used in a previous release where we effectively ignored cancel events to work around another bug. This change removes the workaround and GlowPadView correctly handles the event. Bug 6903638 Change-Id: I9b510985c6da346a4e10cf2535267c8d5efa5871 --- .../internal/widget/multiwaveview/GlowPadView.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java index 549d74c226cdc..f507a795172b1 100644 --- a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java +++ b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java @@ -803,12 +803,8 @@ public class GlowPadView extends View { private void handleCancel(MotionEvent event) { if (DEBUG && mDragging) Log.v(TAG, "** Handle CANCEL"); - // We should drop the active target here but it interferes with - // moving off the screen in the direction of the navigation bar. At some point we may - // want to revisit how we handle this. For now we'll allow a canceled event to - // activate the current target. - - // mActiveTarget = -1; // Drop the active target if canceled. + // Drop the active target if canceled. + mActiveTarget = -1; int actionIndex = event.findPointerIndex(mPointerId); actionIndex = actionIndex == -1 ? 0 : actionIndex;