Skip to content

Commit dc1269b

Browse files
dsandlerAndroid Git Automerger
authored andcommitted
am 2f6a532: Merge "Auto-close if you swipe away the last notification." into ics-mr0
* commit '2f6a53270f113a244f3b6ca91a1efef2c4a26fac': Auto-close if you swipe away the last notification.
2 parents 3585a3d + 2f6a532 commit dc1269b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ public class PhoneStatusBar extends StatusBar {
113113
// will likely move to a resource or other tunable param at some point
114114
private static final int INTRUDER_ALERT_DECAY_MS = 10000;
115115

116+
private static final boolean CLOSE_PANEL_WHEN_EMPTIED = true;
117+
116118
// fling gesture tuning parameters, scaled to display density
117119
private float mSelfExpandVelocityPx; // classic value: 2000px/s
118120
private float mSelfCollapseVelocityPx; // classic value: 2000px/s (will be negated to collapse "up")
@@ -698,6 +700,10 @@ public void removeNotification(IBinder key) {
698700

699701
// Recalculate the position of the sliding windows and the titles.
700702
updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
703+
704+
if (CLOSE_PANEL_WHEN_EMPTIED && mNotificationData.size() == 0 && !mAnimating) {
705+
animateCollapse();
706+
}
701707
}
702708

703709
setAreThereNotifications();

0 commit comments

Comments
 (0)