From ce87a8af9dbf8ee6fb1a40a41451e89bb40246c2 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Mon, 20 Jun 2016 15:40:07 -0700 Subject: Fixed an issue where the deleteintent of children wasn't sent Especially in context of autobundling this could lead to bad bugs Change-Id: Idf722f9675f6f6e49d49c08798e38e09b1c5c01e Fixes: 29515621 --- .../server/notification/NotificationManagerService.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 0af0c7356fa3..c125b1d80a1d 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -67,7 +67,6 @@ import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; -import android.content.IIntentSender; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ApplicationInfo; @@ -2802,7 +2801,7 @@ public class NotificationManagerService extends SystemService { // notification was a summary and its group key changed. if (oldIsSummary && (!isSummary || !oldGroup.equals(group))) { cancelGroupChildrenLocked(old, callingUid, callingPid, null, - REASON_GROUP_SUMMARY_CANCELED); + REASON_GROUP_SUMMARY_CANCELED, false /* sendDelete */); } } @@ -3435,7 +3434,7 @@ public class NotificationManagerService extends SystemService { cancelNotificationLocked(r, sendDelete, reason); cancelGroupChildrenLocked(r, callingUid, callingPid, listenerName, - REASON_GROUP_SUMMARY_CANCELED); + REASON_GROUP_SUMMARY_CANCELED, sendDelete); updateLightsLocked(); } } @@ -3514,7 +3513,7 @@ public class NotificationManagerService extends SystemService { final int M = canceledNotifications.size(); for (int i = 0; i < M; i++) { cancelGroupChildrenLocked(canceledNotifications.get(i), callingUid, callingPid, - listenerName, REASON_GROUP_SUMMARY_CANCELED); + listenerName, REASON_GROUP_SUMMARY_CANCELED, false /* sendDelete */); } } if (canceledNotifications != null) { @@ -3558,14 +3557,14 @@ public class NotificationManagerService extends SystemService { int M = canceledNotifications != null ? canceledNotifications.size() : 0; for (int i = 0; i < M; i++) { cancelGroupChildrenLocked(canceledNotifications.get(i), callingUid, callingPid, - listenerName, REASON_GROUP_SUMMARY_CANCELED); + listenerName, REASON_GROUP_SUMMARY_CANCELED, false /* sendDelete */); } updateLightsLocked(); } // Warning: The caller is responsible for invoking updateLightsLocked(). private void cancelGroupChildrenLocked(NotificationRecord r, int callingUid, int callingPid, - String listenerName, int reason) { + String listenerName, int reason, boolean sendDelete) { Notification n = r.getNotification(); if (!n.isGroupSummary()) { return; @@ -3588,7 +3587,7 @@ public class NotificationManagerService extends SystemService { EventLogTags.writeNotificationCancel(callingUid, callingPid, pkg, childSbn.getId(), childSbn.getTag(), userId, 0, 0, reason, listenerName); mNotificationList.remove(i); - cancelNotificationLocked(childR, false, reason); + cancelNotificationLocked(childR, sendDelete, reason); } } } -- cgit v1.2.3-59-g8ed1b