From 8599a3358077d800e94000d5956a912205eec51b Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Thu, 14 Aug 2014 21:44:23 +0200 Subject: [PATCH] Fix listening states for two-finger and fast-double swipe Bug: 16655660 Change-Id: I46d826edc901e08eb1513fe87de2f63228581617 --- .../systemui/statusbar/phone/NotificationPanelView.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index bac46bef8d0ea..55b147a8b1c70 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -602,6 +602,10 @@ public class NotificationPanelView extends PanelView implements && event.getY(event.getActionIndex()) < mStatusBarMinHeight) { mTwoFingerQsExpand = true; requestPanelHeightUpdate(); + + // Normally, we start listening when the panel is expanded, but here we need to start + // earlier so the state is already up to date when dragging down. + setListening(true); } super.onTouchEvent(event); return true; @@ -621,6 +625,11 @@ public class NotificationPanelView extends PanelView implements mInitialHeightOnTouch = mQsExpansionHeight; mInitialTouchY = event.getX(); mInitialTouchX = event.getY(); + + // If we interrupt an expansion gesture here, make sure to update the state correctly. + if (mIsExpanding) { + onExpandingFinished(); + } } }