Update the download summary icon
Add support for dynamically setting the download summary icon based on
the icons of the other downloads. Currently the summary icon stays as a
single icon type, but it should update to reflect the combined state of
the downloads it represents. This CL updates the summary notification
as the notifications are updated, depending on whether or not the icon
needs to change.
BUG=680819
Review-Url: https://codereview.chromium.org/2730243002
Cr-Commit-Position: refs/heads/master@{#455006}
Committed: https://chromium.googlesource.com/chromium/src/+/31f3265e09220f484c417341ca34acacf191600e
min ptal. updates the summary icon with the notifications. thanks.
3 years, 9 months ago
(2017-03-04 23:10:53 UTC)
#2
min ptal. updates the summary icon with the notifications. thanks.
qinmin
https://codereview.chromium.org/2730243002/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/2730243002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode205 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:205: if (addedNotification != null && addedNotification.first == notification.getId()) if ...
3 years, 9 months ago
(2017-03-05 06:48:26 UTC)
#3
https://codereview.chromium.org/2730243002/diff/20001/chrome/android/java/src...
File
chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
(right):
https://codereview.chromium.org/2730243002/diff/20001/chrome/android/java/src...
chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:205:
if (addedNotification != null && addedNotification.first ==
notification.getId())
if addedNotification is not null, this for loop skips the notification that is
the addedNotification.
However, after the for loop, there is an if statement to consider the icon for
this addedNotification.
if (addedNotification != null) {
......
}
So why cannot we remove the latter if statement?
David Trainor- moved to gerrit
https://codereview.chromium.org/2730243002/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/2730243002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode205 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:205: if (addedNotification != null && addedNotification.first == notification.getId()) On ...
3 years, 9 months ago
(2017-03-06 16:29:54 UTC)
#4
https://codereview.chromium.org/2730243002/diff/20001/chrome/android/java/src...
File
chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
(right):
https://codereview.chromium.org/2730243002/diff/20001/chrome/android/java/src...
chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:205:
if (addedNotification != null && addedNotification.first ==
notification.getId())
On 2017/03/05 06:48:26, qinmin wrote:
> if addedNotification is not null, this for loop skips the notification that is
> the addedNotification.
> However, after the for loop, there is an if statement to consider the icon for
> this addedNotification.
>
> if (addedNotification != null) {
> ......
> }
>
> So why cannot we remove the latter if statement?
The added notification might not be shown yet, so it might not be in the list of
StatusBarNotifications that we query.
David Trainor- moved to gerrit
The CQ bit was checked by dtrainor@chromium.org to run a CQ dry run
3 years, 9 months ago
(2017-03-06 18:55:33 UTC)
#5
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/131504)
3 years, 9 months ago
(2017-03-06 19:21:54 UTC)
#8
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/222821)
3 years, 9 months ago
(2017-03-06 20:14:40 UTC)
#12
3 years, 9 months ago
(2017-03-06 21:15:26 UTC)
#16
Dry run: This issue passed the CQ dry run.
qinmin
https://codereview.chromium.org/2730243002/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/2730243002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode205 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:205: if (addedNotification != null && addedNotification.first == notification.getId()) On ...
3 years, 9 months ago
(2017-03-06 21:43:43 UTC)
#17
https://codereview.chromium.org/2730243002/diff/20001/chrome/android/java/src...
File
chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
(right):
https://codereview.chromium.org/2730243002/diff/20001/chrome/android/java/src...
chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:205:
if (addedNotification != null && addedNotification.first ==
notification.getId())
On 2017/03/06 16:29:54, David Trainor wrote:
> On 2017/03/05 06:48:26, qinmin wrote:
> > if addedNotification is not null, this for loop skips the notification that
is
> > the addedNotification.
> > However, after the for loop, there is an if statement to consider the icon
for
> > this addedNotification.
> >
> > if (addedNotification != null) {
> > ......
> > }
> >
> > So why cannot we remove the latter if statement?
>
> The added notification might not be shown yet, so it might not be in the list
of
> StatusBarNotifications that we query.
i see, in that case, can we just initialize those booleans to those values from
the addedNotification if it is non null?
It looks ugly to have a lot of redudant code here.
qinmin
lgtm % nit https://codereview.chromium.org/2730243002/diff/80001/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/2730243002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java#newcode566 chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java:566: return; nit: return can go to ...
3 years, 9 months ago
(2017-03-06 21:47:14 UTC)
#18
CQ is committing da patch. Bot data: {"patchset_id": 120001, "attempt_start_ts": 1488846810886440, "parent_rev": "09d4b5a586b0701cf794aa34b86b352196b481a5", "commit_rev": "31f3265e09220f484c417341ca34acacf191600e"}
3 years, 9 months ago
(2017-03-07 00:40:05 UTC)
#27
CQ is committing da patch.
Bot data: {"patchset_id": 120001, "attempt_start_ts": 1488846810886440,
"parent_rev": "09d4b5a586b0701cf794aa34b86b352196b481a5", "commit_rev":
"31f3265e09220f484c417341ca34acacf191600e"}
commit-bot: I haz the power
Description was changed from ========== Update the download summary icon Add support for dynamically setting ...
3 years, 9 months ago
(2017-03-07 00:40:47 UTC)
#28
Message was sent while issue was closed.
Description was changed from
==========
Update the download summary icon
Add support for dynamically setting the download summary icon based on
the icons of the other downloads. Currently the summary icon stays as a
single icon type, but it should update to reflect the combined state of
the downloads it represents. This CL updates the summary notification
as the notifications are updated, depending on whether or not the icon
needs to change.
BUG=680819
==========
to
==========
Update the download summary icon
Add support for dynamically setting the download summary icon based on
the icons of the other downloads. Currently the summary icon stays as a
single icon type, but it should update to reflect the combined state of
the downloads it represents. This CL updates the summary notification
as the notifications are updated, depending on whether or not the icon
needs to change.
BUG=680819
Review-Url: https://codereview.chromium.org/2730243002
Cr-Commit-Position: refs/heads/master@{#455006}
Committed:
https://chromium.googlesource.com/chromium/src/+/31f3265e09220f484c417341ca34...
==========
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/31f3265e09220f484c417341ca34acacf191600e
3 years, 9 months ago
(2017-03-07 00:40:48 UTC)
#29
Issue 2730243002: Update the download summary icon
(Closed)
Created 3 years, 9 months ago by David Trainor- moved to gerrit
Modified 3 years, 9 months ago
Reviewers: qinmin
Base URL:
Comments: 5