summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Daniel Sandler <dsandler@android.com> 2011-10-19 11:58:27 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2011-10-19 11:58:27 -0700
commit2f6a53270f113a244f3b6ca91a1efef2c4a26fac (patch)
tree6ca61d17a4c42ecdda571265783e20db7f2b5c62
parent47f8367ab79247501d5d204632a7797fa8a888e5 (diff)
parent8cc36e572876f3bb9197f0109db3042466e5f917 (diff)
Merge "Auto-close if you swipe away the last notification." into ics-mr0
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java6
1 files changed, 6 insertions, 0 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 77a7f5126fcc..352d4a18f214 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -113,6 +113,8 @@ public class PhoneStatusBar extends StatusBar {
// will likely move to a resource or other tunable param at some point
private static final int INTRUDER_ALERT_DECAY_MS = 10000;
+ private static final boolean CLOSE_PANEL_WHEN_EMPTIED = true;
+
// fling gesture tuning parameters, scaled to display density
private float mSelfExpandVelocityPx; // classic value: 2000px/s
private float mSelfCollapseVelocityPx; // classic value: 2000px/s (will be negated to collapse "up")
@@ -698,6 +700,10 @@ public class PhoneStatusBar extends StatusBar {
// Recalculate the position of the sliding windows and the titles.
updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
+
+ if (CLOSE_PANEL_WHEN_EMPTIED && mNotificationData.size() == 0 && !mAnimating) {
+ animateCollapse();
+ }
}
setAreThereNotifications();