userId, mustHaveFlags, mustNotHaveFlags, reason, listenerName);
synchronized (mNotificationLock) {
- // Look for the notification, searching both the posted and enqueued lists.
- NotificationRecord r = findNotificationLocked(pkg, tag, id, userId);
+ // If the notification is currently enqueued, repost this runnable so it has a
+ // chance to notify listeners
+ if ((findNotificationByListLocked(
+ mEnqueuedNotifications, pkg, tag, id, userId)) != null) {
+ mHandler.post(this);
+ }
+ // Look for the notification in the posted list, since we already checked enq
+ NotificationRecord r = findNotificationByListLocked(
+ mNotificationList, pkg, tag, id, userId);
if (r != null) {
// The notification was found, check if it should be removed.