From 5fee8360f8b5beb89700329ee57ec52295c62425 Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Thu, 12 Sep 2013 10:34:33 -0400 Subject: [PATCH] Status bar interaction veto revoked on ups/cancels. If we get an ACTION_UP or ACTION_CANCEL and the shade is not expanded, treat this as a signal of !interacting, revoking the interaction veto. Bug:10711758 Change-Id: Ia69ff24880193fa8d99ece79053eeb95dfa9ba71 --- .../android/systemui/statusbar/phone/PhoneStatusBar.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 814f5db7ba9e7..64d4c7f563ef0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -1737,7 +1737,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode { } if (mStatusBarWindowState == WINDOW_STATE_SHOWING) { - setInteracting(StatusBarManager.WINDOW_STATUS_BAR, true); + final boolean upOrCancel = + event.getAction() == MotionEvent.ACTION_UP || + event.getAction() == MotionEvent.ACTION_CANCEL; + if (upOrCancel && !mExpandedVisible) { + setInteracting(StatusBarManager.WINDOW_STATUS_BAR, false); + } else { + setInteracting(StatusBarManager.WINDOW_STATUS_BAR, true); + } } return false; }