Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Issue 2726423002: Fix DownloadNotificationService foreground state (Closed)

Created:
3 years, 9 months ago by David Trainor- moved to gerrit
Modified:
3 years, 9 months ago
Reviewers:
qinmin
CC:
chromium-reviews, asanka, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix 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 #

Messages

Total messages: 21 (13 generated)
David Trainor- moved to gerrit
ptal :'( https://codereview.chromium.org/2726423002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java (right): https://codereview.chromium.org/2726423002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode293 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:293: // TODO(dtrainor): Post a task to make ...
3 years, 9 months ago (2017-03-03 20:11:22 UTC) #2
qinmin
lgtm % nit, and please fix the issue in shutDownService https://codereview.chromium.org/2726423002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java (right): https://codereview.chromium.org/2726423002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode401 ...
3 years, 9 months ago (2017-03-03 20:48:40 UTC) #3
David Trainor- moved to gerrit
https://codereview.chromium.org/2726423002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java (right): https://codereview.chromium.org/2726423002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode293 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:293: // TODO(dtrainor): Post a task to make SURE the ...
3 years, 9 months ago (2017-03-04 06:46:01 UTC) #8
David Trainor- moved to gerrit
min can you give this another once-over? i update a lot of the logic and ...
3 years, 9 months ago (2017-03-04 21:44:05 UTC) #9
qinmin
lgtm % nit https://codereview.chromium.org/2726423002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java (right): https://codereview.chromium.org/2726423002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode301 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:301: void stopForegroundInteral(boolean killNotification) { nit:s/Interal/Internal/
3 years, 9 months ago (2017-03-05 06:09:29 UTC) #10
David Trainor- moved to gerrit
https://codereview.chromium.org/2726423002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java File chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java (right): https://codereview.chromium.org/2726423002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode301 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:301: void stopForegroundInteral(boolean killNotification) { On 2017/03/05 06:09:29, qinmin wrote: ...
3 years, 9 months ago (2017-03-06 18:56:08 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2726423002/40001
3 years, 9 months ago (2017-03-06 20:23:50 UTC) #18
commit-bot: I haz the power
3 years, 9 months ago (2017-03-06 20:30:10 UTC) #21
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/1f6307adb1b1ff13661af0432d73...

Powered by Google App Engine
This is Rietveld 408576698