diff options
| author | 2012-11-07 16:58:30 -0800 | |
|---|---|---|
| committer | 2012-11-07 16:58:30 -0800 | |
| commit | 5ec00e930fb4d523ce5784fb336841410d030cef (patch) | |
| tree | 163f9e3dabffbcb10ed5626c22f1d641ab4a8432 | |
| parent | 512950a9713f79f2900c73201906436d12da8639 (diff) | |
Don't cancel any notifications that are meant for all users, if no package is specified.
Bug: 7490028
Otherwise notifications such as the USB debugging and OTA notifications will be
dismissed when any user is stopped.
Change-Id: I0ae0c1136a999dd3aade99ca9e71c714b359eab4
| -rwxr-xr-x | services/java/com/android/server/NotificationManagerService.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index 0e171cdf6c47..216323ea6577 100755 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -1261,6 +1261,10 @@ public class NotificationManagerService extends INotificationManager.Stub if (!notificationMatchesUserId(r, userId)) { continue; } + // Don't remove notifications to all, if there's no package name specified + if (r.userId == UserHandle.USER_ALL && pkg == null) { + continue; + } if ((r.notification.flags & mustHaveFlags) != mustHaveFlags) { continue; } |