BackgroundTaskScheduler delegate for JobScheduler always overwrites jobs |
||
Issue descriptionBased on documentation of job scheduler https://developer.android.com/reference/android/app/job/JobScheduler.html#schedule(android.app.job.JobInfo) this code: https://cs.chromium.org/chromium/src/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerJobService.java?type=cs&q=shouldUpdateCurrent+package:%5Echromium$&l=144 if (taskInfo.shouldUpdateCurrent()) { jobScheduler.cancel(taskInfo.getTaskId()); } int result = jobScheduler.schedule(jobInfo); in schedule implementation of the delegate is wrong (as it does not prevent the update to current task). Tommy let me know if you would like to see it merged to M-60. This affects everything from M58
,
May 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c33f7598aadfe913c6b4718e3b879ded0444140a commit c33f7598aadfe913c6b4718e3b879ded0444140a Author: fgorski <fgorski@chromium.org> Date: Fri May 26 23:25:19 2017 [Android] Reimplementing BTSJobSerivce delegate to not overwrite tasks Change includes looking through all scheduled jobs and not scheduling a task if there is already a pending job with matching ID We cannot use getPendingJob as it is not available until API v24. BUG=726860 Review-Url: https://codereview.chromium.org/2906063004 Cr-Commit-Position: refs/heads/master@{#475183} [modify] https://crrev.com/c33f7598aadfe913c6b4718e3b879ded0444140a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerJobService.java
,
Sep 11 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by fgor...@chromium.org
, May 26 2017