From b926666a76d25b7d1b693025ffa7e0118fad547e Mon Sep 17 00:00:00 2001 From: Dong-wan Kim Date: Wed, 21 Sep 2016 13:08:30 -0700 Subject: [PATCH] Fix DismissView cannot be clicked sometimes after boot mActivePointerId should be initialized to INVALID_POINTER. Otherwise, the click event to DismissView can be intercepted by onInterceptTouchEventScroll() due to wrong calculated value of yDiff when mActivePointerId is not intialized. This issue can be reproduced at the first click to DismissView while user have not touched any notification views ever after boot. And that click event must contains some MOVE events. Test: manual - Check whether user always can click DismissView after boot. Fixes: 31649735 Change-Id: If9baf6db1b891a58e17153806d52d395ddd661df --- .../systemui/statusbar/stack/NotificationStackScrollLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index d1de38c7b9e4f..9552f0501b5e8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -130,7 +130,7 @@ public class NotificationStackScrollLayout extends ViewGroup private boolean mIsBeingDragged; private int mLastMotionY; private int mDownX; - private int mActivePointerId; + private int mActivePointerId = INVALID_POINTER; private boolean mTouchIsClick; private float mInitialTouchX; private float mInitialTouchY;