DescriptionFix DownloadNotificationService foreground state
There are some cases that keep the summary notification visible. This
CL tries to address them (but does not catch *all* cases). The
following scenarios are now handled:
- NotificationManager#notify() posts a task, which means querying
NotificationManager#getActiveNotifications() might not take into account
the addition. Only hide the summary if there are no currently running
notifications.
- NotificationManager#cancel() also posts at ask which causes the same
issues. Ignore the notification id that was passed to cancel when
checking the list state.
There are still some cases where NotificationManager#cancel() on the
summary doesn't dismiss it. This needs to be investigated in a follow
up (or a failsafe added and the code refactored).
BUG=680819
Review-Url: https://codereview.chromium.org/2726423002
Cr-Commit-Position: refs/heads/master@{#454941}
Committed: https://chromium.googlesource.com/chromium/src/+/1f6307adb1b1ff13661af0432d735866f2531831
Patch Set 1 #
Total comments: 4
Patch Set 2 : Added code to address race conditions for cancel #
Total comments: 2
Patch Set 3 : Fix spelling mistake #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 21 (13 generated)
|