summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2018-08-20 17:58:25 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-08-20 17:58:25 +0000
commitccefa79c075e56e9c153b1ab021993ebc92cfea7 (patch)
tree127a5de8e88cff5b18ff522486f428eca45cc075
parent14c6b42b725e63f240a80fa5c630149dde71520a (diff)
parent038e259cf54c4fdfc98bda4eeb42fb5de740ad50 (diff)
Merge "Fixed a leak of a notification when replying to a conversation" into pi-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java
index 06f26c9cbc7c..469c3c2c60b1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java
@@ -667,9 +667,15 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater.
entry.row.getNotificationChildren();
for (int i = 0; i < notificationChildren.size(); i++) {
ExpandableNotificationRow row = notificationChildren.get(i);
- if ((row.getStatusBarNotification().getNotification().flags
- & Notification.FLAG_FOREGROUND_SERVICE) != 0) {
- // the child is a foreground service notification which we can't remove!
+ NotificationData.Entry childEntry = row.getEntry();
+ boolean isForeground = (row.getStatusBarNotification().getNotification().flags
+ & Notification.FLAG_FOREGROUND_SERVICE) != 0;
+ boolean keepForReply = FORCE_REMOTE_INPUT_HISTORY
+ && (shouldKeepForRemoteInput(childEntry)
+ || shouldKeepForSmartReply(childEntry));
+ if (isForeground || keepForReply) {
+ // the child is a foreground service notification which we can't remove or it's
+ // a child we're keeping around for reply!
continue;
}
row.setKeepInParent(true);