diff options
| author | 2013-08-08 11:27:29 +0000 | |
|---|---|---|
| committer | 2013-08-08 11:27:30 +0000 | |
| commit | 7a605df3137ee571dec855761c0cb15b28513d26 (patch) | |
| tree | a6f78e14f82f193cc6b14d2034ef020be7552392 | |
| parent | e97f90b9bbe3e75db058827887a842c5f4a0dda0 (diff) | |
| parent | 1caf7eb5999b7c57ca35cbe3579aa8d6b63394cd (diff) | |
Merge "Don't always auto-collapse an empty notification shade."
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 3 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java | 18 |
2 files changed, 20 insertions, 1 deletions
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 ed9b542eb43c..a92703c6b5ac 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -968,7 +968,8 @@ public class PhoneStatusBar extends BaseStatusBar { mHandler.sendEmptyMessage(MSG_HIDE_HEADS_UP); } - if (CLOSE_PANEL_WHEN_EMPTIED && mNotificationData.size() == 0) { + if (CLOSE_PANEL_WHEN_EMPTIED && mNotificationData.size() == 0 + && !mStatusBarWindow.isPointerDown()) { animateCollapsePanels(); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java index a600aae386d9..800bc02fc3bf 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java @@ -42,6 +42,7 @@ public class StatusBarWindowView extends FrameLayout private NotificationRowLayout latestItems; private NotificationPanelView mNotificationPanel; private ScrollView mScrollView; + private boolean mPointerDown; PhoneStatusBar mService; @@ -86,6 +87,7 @@ public class StatusBarWindowView extends FrameLayout @Override public boolean onInterceptTouchEvent(MotionEvent ev) { + registerPointer(ev); boolean intercept = false; if (mNotificationPanel.isFullyExpanded() && mScrollView.getVisibility() == View.VISIBLE) { intercept = mExpandHelper.onInterceptTouchEvent(ev); @@ -131,5 +133,21 @@ public class StatusBarWindowView extends FrameLayout mExpandHelper.cancel(); } } + + private void registerPointer(MotionEvent event) { + switch (event.getAction()) { + case MotionEvent.ACTION_DOWN: + mPointerDown = true; + break; + case MotionEvent.ACTION_CANCEL: + case MotionEvent.ACTION_UP: + mPointerDown = false; + break; + } + } + + public boolean isPointerDown() { + return mPointerDown; + } } |