From c5e8dca7f11d3c085dd1e98692fcc21f1bcc0f6f Mon Sep 17 00:00:00 2001 From: StevenHarperUK Date: Fri, 22 Feb 2013 23:06:14 +0000 Subject: Bugfix : Quick pulldown sometimes flips when it should not When your Quick Settings Panel is set to Quick pulldown : right Sometimes (very intermittently) the tray flips (to Quick Settings) as you pull it down from the right side. This is happening because the pull down happened so fast you can see the top 0-10 pixels of the tray, and because it was showing the notifications, not the Quick Settiings However the user expects the tray not to flip, but to just be on the Quck Settings. The new code simply checks to see that the Event was a pull down event and that the event started in the top status bar. If this is the case, then the quick panel is swapped to (without flip) Special Thanks to my daughter Jenny fo painstakingly reproducing this bug. Change-Id: I8fdbedb1aa6d4fd672bd4cb58b7c99557469ab62 --- .../android/systemui/statusbar/phone/NotificationPanelView.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/phone') 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 b46aa3d..480dc99 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -181,7 +181,12 @@ public class NotificationPanelView extends PanelView { if (getMeasuredHeight() < mHandleBarHeight) { mStatusBar.switchToSettings(); } else { - mStatusBar.flipToSettings(); + // Do not flip if the drag event started within the top bar + if (MotionEvent.ACTION_DOWN == event.getActionMasked() && event.getY(0) < mHandleBarHeight ) { + mStatusBar.switchToSettings(); + } else { + mStatusBar.flipToSettings(); + } } mOkToFlip = false; } -- cgit v1.1