This is one of the steps in the refactor to make downloads a foreground service. This step creates a separate class that manages starting and stoping the foreground service. Currently, this is not being used by any of the classes, but will eventually be integrated to be called every time there is a change in a download (ie. a download has been started, paused, resumed, completed, canceled, or deleted).
Bug: 747571,747563 Change-Id: Ie9a7ee2950481b5c403e09ede535f763ef44d653 Reviewed-on: https://chromium-review.googlesource.com/572147 Commit-Queue: Joy Ming
cc46b05 Create a class to start and stop the foreground service for downloads.
.../download/DownloadForegroundService.java | 71 ++++++
.../download/DownloadForegroundServiceManager.java | 220 +++++++++++++++++
.../notifications/NotificationConstants.java | 2 +
chrome/android/java_sources.gni | 3 +
.../DownloadForegroundServiceManagerTest.java | 271 +++++++++++++++++++++
5 files changed, 567 insertions(+)