New issue
Advanced search Search tips

Issue 693273 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Notification comes back when cancelling an ongoing download

Project Member Reported by qin...@chromium.org, Feb 17 2017

Issue description

Can be reproduced on trunk
Steps to reproduce:
(1) Download a large file
(2) While downloading, click the cancel button on notification

Expected result:
notification should dissapear

Actual result:
Sometimes the notification will comeback after dissapearing




 
Status: Assigned (was: Unconfirmed)
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5939cf034a8d276d3f08b16a85503905a4c0580a

commit 5939cf034a8d276d3f08b16a85503905a4c0580a
Author: qinmin <qinmin@chromium.org>
Date: Sun Feb 19 18:38:28 2017

remove unnecessary thread hopping when updating Download notifications

We create an async task to call DownloadManagerService.updateAllNotifications() when updating notifications.
However, later we post a task back to the Ui thread in SystemDownloadNotifier
We create the Async task just because of the strict mode:
addCompletedDownload() and canResolveDownloadItem() needs to be on a non UI thread.
This CL moves the updateAllNotifications() back to the UI thread.
only addCompletedDownload() and canResolveDownloadItem() are left in the async task.

BUG= 693273 

Review-Url: https://codereview.chromium.org/2701613005
Cr-Commit-Position: refs/heads/master@{#451524}

[modify] https://crrev.com/5939cf034a8d276d3f08b16a85503905a4c0580a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
[modify] https://crrev.com/5939cf034a8d276d3f08b16a85503905a4c0580a/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java
[modify] https://crrev.com/5939cf034a8d276d3f08b16a85503905a4c0580a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java
[modify] https://crrev.com/5939cf034a8d276d3f08b16a85503905a4c0580a/chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java

Comment 3 by qin...@chromium.org, Feb 19 2017

Labels: Merge-Request-57
Status: Started (was: Assigned)
Project Member

Comment 4 by sheriffbot@chromium.org, Feb 19 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 21 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/077bc6423f11464baa6e8c1a164e37f0f5239e6f

commit 077bc6423f11464baa6e8c1a164e37f0f5239e6f
Author: Min Qin <qinmin@chromium.org>
Date: Tue Feb 21 19:06:05 2017

remove unnecessary thread hopping when updating Download notifications

We create an async task to call DownloadManagerService.updateAllNotifications() when updating notifications.
However, later we post a task back to the Ui thread in SystemDownloadNotifier
We create the Async task just because of the strict mode:
addCompletedDownload() and canResolveDownloadItem() needs to be on a non UI thread.
This CL moves the updateAllNotifications() back to the UI thread.
only addCompletedDownload() and canResolveDownloadItem() are left in the async task.

BUG= 693273 
TBR=dfalcantara@chromium.org

Review-Url: https://codereview.chromium.org/2701613005
Cr-Commit-Position: refs/heads/master@{#451524}
(cherry picked from commit 5939cf034a8d276d3f08b16a85503905a4c0580a)

Review-Url: https://codereview.chromium.org/2713433002 .
Cr-Commit-Position: refs/branch-heads/2987@{#614}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/077bc6423f11464baa6e8c1a164e37f0f5239e6f/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
[modify] https://crrev.com/077bc6423f11464baa6e8c1a164e37f0f5239e6f/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java
[modify] https://crrev.com/077bc6423f11464baa6e8c1a164e37f0f5239e6f/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java
[modify] https://crrev.com/077bc6423f11464baa6e8c1a164e37f0f5239e6f/chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java

Verified in M57 - 57.0 2987.72 build

Comment 7 by qin...@chromium.org, Feb 23 2017

Issue 695142 has been merged into this issue.
Status: Fixed (was: Started)

Comment 9 by ananthak@google.com, Apr 27 2017

Components: UI>Browser>Downloads

Sign in to add a comment