[Downloads Foreground Service] Figure out flicker |
||
Issue descriptionCurrently the notifications are flickering every time: - The notification is paused. - The notification is completed. This is a hack to get around the fact that we can't detach notifications from the foreground gracefully pre-N. Is there a configuration that has less switching?
,
Oct 5 2017
Thanks for the video. That is pretty bad. Why does this happen for downloads, but not for media play/pause interactions, which also uses a foreground notification?
,
Oct 5 2017
My guesses: - There aren't multiple notifications - If you pause and then kill music, it kills the notification with it (whereas we have been keeping the notification around)
,
Oct 5 2017
The first could be true, but with the second, you are playing an pausing the media file just like a download (e.g., you need to change the state of the button, but the notification still sticks around). It might be worth checking with mlamouri@ when he gets back from vacation next week.
,
Oct 5 2017
This is what I mean by when you pause and kill music the notification disappears: https://drive.google.com/a/google.com/file/d/0BwltPzKKkOFqMnM4cDVIZ0g3Sk0/view?usp=sharing Though even if we decide on this behavior, this will be hard to do for multiple notification.
,
Oct 5 2017
so does this flicker behavior only happens when Chrome gets killed or it happens as a result of the fact that we want the notification to stick around even if Chrome gets killed?
,
Oct 5 2017
Currently, The notification will flicker in most cases when it's paused and successful (specifically if there's no other downloads). One solution might have the tradeoff of having the notification die with Chrome, like it does with Play Music :(
,
Oct 13 2017
Adding a doc of the different things I've tried so far/logic, still thinking through this: https://docs.google.com/document/d/1pQed3gm-Q_lAzGL9lWV1Arsni2vN7J1kXd-nLuIOaBw/edit#
,
Oct 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/431b1802ce6bbce1994a8b67f173530cba914b9b commit 431b1802ce6bbce1994a8b67f173530cba914b9b Author: Joy Ming <jming@chromium.org> Date: Thu Oct 26 00:22:58 2017 Make flicker less frequent. This is part of a larger refactor to make downloads a foreground service on all versions of Android. Before this CL, on Android API <= 24 the downloads notification would flicker on pause and on completion as a hack to disassociate the notification from the foreground service. However, this leads to a lot of flickering. This CL reduces the amount of flickering to be only in the cases of completion and when the notification that is pinned to the foreground is switched. Basically, this means that the notification will flicker in all cases of completion (which is the same as before) and fewer cases of pause, only when the user has another download running, which is less likely anyways. Bug: 771802 , 747563 Change-Id: Ic0d30cb7d91726a7015a6db9b0dc6e113140fd54 Reviewed-on: https://chromium-review.googlesource.com/703486 Commit-Queue: Joy Ming <jming@chromium.org> Reviewed-by: David Trainor <dtrainor@chromium.org> Cr-Commit-Position: refs/heads/master@{#511660} [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManager.java [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadForegroundService.java [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadForegroundServiceManager.java [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadForegroundServiceObservers.java [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService2.java [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationServiceObserver.java [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier2.java [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/java_sources.gni [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadForegroundServiceManagerTest.java [add] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadForegroundServiceTest.java [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest2.java [modify] https://crrev.com/431b1802ce6bbce1994a8b67f173530cba914b9b/chrome/android/javatests/src/org/chromium/chrome/browser/download/MockDownloadNotificationService2.java
,
Oct 26 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by jming@chromium.org
, Oct 5 2017