From 84e6de77788602bbd8dbb0b96c58c4254cb54b5b Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Mon, 22 Feb 2016 20:57:43 -0800 Subject: [PATCH] Fixed a bug where QS could fling up even when collapsing We previously changed the touch logic to always fling even when the panel is fully expanded, but that lad to an issue when it didn't even start to expand. Bug: 26255211 Change-Id: I8c991a0a19b49eb405b8efc2d69baf29c709b363 --- .../systemui/statusbar/phone/NotificationPanelView.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 8381f185cc496..05ae41be33d44 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -879,7 +879,11 @@ public class NotificationPanelView extends PanelView implements mQsTracking = false; mTrackingPointer = -1; trackMovement(event); - flingQsWithCurrentVelocity(y, event.getActionMasked() == MotionEvent.ACTION_CANCEL); + float fraction = getQsExpansionFraction(); + if (fraction != 0f || y >= mInitialTouchY) { + flingQsWithCurrentVelocity(y, + event.getActionMasked() == MotionEvent.ACTION_CANCEL); + } if (mVelocityTracker != null) { mVelocityTracker.recycle(); mVelocityTracker = null;