summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2011-10-19 12:00:13 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-19 12:00:13 -0700
commitdc1269b5469e3d2b12c8f355b136e0d8f9a2608f (patch)
tree48b56ad2d60da3ea1c31fb02e638e6987fc1d5ec /packages
parent3585a3dfc6824581e8b4b46bfa1207bb18fad0cf (diff)
parent2f6a53270f113a244f3b6ca91a1efef2c4a26fac (diff)
downloadframeworks_base-dc1269b5469e3d2b12c8f355b136e0d8f9a2608f.zip
frameworks_base-dc1269b5469e3d2b12c8f355b136e0d8f9a2608f.tar.gz
frameworks_base-dc1269b5469e3d2b12c8f355b136e0d8f9a2608f.tar.bz2
am 2f6a5327: Merge "Auto-close if you swipe away the last notification." into ics-mr0
* commit '2f6a53270f113a244f3b6ca91a1efef2c4a26fac': Auto-close if you swipe away the last notification.
Diffstat (limited to 'packages')
-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 77a7f51..352d4a1 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();