Client merge requestshttps://staging.gitlab.com/fdroid/fdroidclient/-/merge_requests2017-09-29T13:50:14Zhttps://staging.gitlab.com/fdroid/fdroidclient/-/merge_requests/416WIP: modernize update scheduling2017-09-29T13:50:14Zusername-removed-24982WIP: modernize update schedulingThis is just the first step towards modernizing the scheduling of updates, including index and auto app updates. Android 5.0 introduced `JobScheduler` which will try to opportunistically schedule jobs based on whether the device is idle...This is just the first step towards modernizing the scheduling of updates, including index and auto app updates. Android 5.0 introduced `JobScheduler` which will try to opportunistically schedule jobs based on whether the device is idle, there is good wifi, its connected to power, etc. This can help us drive the update process entirely to when the device is plugged in, connected to the home wifi, and idle.
The annoying part is that this requires putting the work into a new `JobService`. `UpdateService` is currently an `IntentService`. So in this merge request, there is just a shim `JobService`. Ideally, the full update procedure would happen in the `JobService`, and heed its `onStopJob()` callback.
This is only very lightly tested, I'm posting it for feedback on how its implemented @commonsguy @relan @pserwylo @ssinelnikau1.1