summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mady Mellor <madym@google.com> 2017-07-19 10:52:47 -0700
committer Mady Mellor <madym@google.com> 2017-07-19 11:47:38 -0700
commit32343e6bd91d3e1527c1f77ef63595cd8b8ea920 (patch)
tree6aa498895585b3cc00ee5467f1dc94f8b6a69dae
parentdc7b2bc5e3b1d00f02b5c9a9dc8fde2a3c459bff (diff)
Fix snooze not dismissing when it should
Simply check whether the guts is a leavebehind, if it is allow it to be dismissed. Test: manual - snooze a notification, touch outside note that it disappears - show notification controls on a notification that will be removed, note that the controls remain, once 'done' is hit the notification is removed Bug: 63788509 Change-Id: I42c97239f4e3e17f2e69322c94bd8e8f9d7f0737
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java3
2 files changed, 6 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
index 23a67e2533aa..54d622b341f1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
@@ -329,4 +329,8 @@ public class NotificationGuts extends FrameLayout {
public boolean isExposed() {
return mExposed;
}
+
+ public boolean isLeavebehind() {
+ return mGutsContent != null && mGutsContent.isLeavebehind();
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 23969f985e32..64c42a48551b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -1790,7 +1790,8 @@ public class StatusBar extends SystemUI implements DemoMode,
return;
}
if (entry != null && mNotificationGutsExposed != null
- && mNotificationGutsExposed == entry.row.getGuts()) {
+ && mNotificationGutsExposed == entry.row.getGuts() && entry.row.getGuts() != null
+ && !entry.row.getGuts().isLeavebehind()) {
Log.w(TAG, "Keeping notification because it's showing guts. " + key);
mLatestRankingMap = ranking;
mKeyToRemoveOnGutsClosed = key;