Skip to content

Commit 9eacab8

Browse files
Amith YamasaniAndroid Git Automerger
authored andcommitted
am 3fe2cb4: Merge "Don\'t cancel any notifications that are meant for all users, if no package is specified." into jb-mr1-dev
* commit '3fe2cb4db60827889abd1f971910f807ae346488': Don't cancel any notifications that are meant for all users, if no package is specified.
2 parents e7e210c + 3fe2cb4 commit 9eacab8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

services/java/com/android/server/NotificationManagerService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,10 @@ boolean cancelAllNotificationsInt(String pkg, int mustHaveFlags,
12611261
if (!notificationMatchesUserId(r, userId)) {
12621262
continue;
12631263
}
1264+
// Don't remove notifications to all, if there's no package name specified
1265+
if (r.userId == UserHandle.USER_ALL && pkg == null) {
1266+
continue;
1267+
}
12641268
if ((r.notification.flags & mustHaveFlags) != mustHaveFlags) {
12651269
continue;
12661270
}

0 commit comments

Comments
 (0)