Fix an issue that notification will disappear when pausing a download on M and L
on M and L, detaching a notification from foreground service is not supported. As a result, the current implementation just put the notification in a sharedPreference and persist it across service restarts. However, the recent introduction of stopSelf() will remove the notification, and service will not restart. The logic for M and L really complicates the implementation, and the only side effect it tries to save is the notification flicker when pausing a download. This CL removes the notification persisting logic for L and M. When stopping the foreground service, we simply kill the existing notification, and launch a new one. BUG=919026 Change-Id: Ie9df5d17714d7ff9c54eed8f9b3ca1ddfaaf3199 Reviewed-on: https://chromium-review.googlesource.com/c/1432875Reviewed-by:David Trainor <dtrainor@chromium.org> Reviewed-by:
Xing Liu <xingliu@chromium.org> Commit-Queue: Min Qin <qinmin@chromium.org> Cr-Commit-Position: refs/heads/master@{#625803}
Showing
Please register or sign in to comment