Skip to content

WIP: modernize update scheduling

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 @ssinelnikau

Merge request reports

Loading