Fix 'stuck notification' bug
Apply implied flags before notifying listeners. Bug: 15589158 Change-Id: Ie1c7374fa562ff62725361fb0dc8b0d1a6725618
This commit is contained in:
@@ -1551,8 +1551,16 @@ public class NotificationManagerService extends SystemService {
|
||||
mNotificationsByKey.remove(old.sbn.getKey());
|
||||
r.isUpdate = true;
|
||||
}
|
||||
|
||||
mNotificationsByKey.put(n.getKey(), r);
|
||||
|
||||
// Ensure if this is a foreground service that the proper additional
|
||||
// flags are set.
|
||||
if ((notification.flags & Notification.FLAG_FOREGROUND_SERVICE) != 0) {
|
||||
notification.flags |= Notification.FLAG_ONGOING_EVENT
|
||||
| Notification.FLAG_NO_CLEAR;
|
||||
}
|
||||
|
||||
applyZenModeLocked(r);
|
||||
|
||||
Collections.sort(mNotificationList, mRankingComparator);
|
||||
@@ -1571,13 +1579,6 @@ public class NotificationManagerService extends SystemService {
|
||||
+ n.getPackageName());
|
||||
}
|
||||
|
||||
// Ensure if this is a foreground service that the proper additional
|
||||
// flags are set.
|
||||
if ((notification.flags & Notification.FLAG_FOREGROUND_SERVICE) != 0) {
|
||||
notification.flags |= Notification.FLAG_ONGOING_EVENT
|
||||
| Notification.FLAG_NO_CLEAR;
|
||||
}
|
||||
|
||||
buzzBeepBlinkLocked(r);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user