No auto-update on always-on devices: don't require device to be idle
- Device OS and version: emteria.OS / Android 7.1.2
- Device model/manufacturer: Raspberry Pi
- F-Droid version (in the About screen): 1.5.1
- F-Droid privileged extension version (if installed):
What did you do? (clear steps if possible)
Pushed a newer version of an application to my F-Droid repository.
What did you expect to see?
F-Droid to fetch the app index and install the newer version automatically.
What did you see instead?
Only manual updates work.
Analysis / details
It looks like F-Droid sets the "device idle" requirement when scheduling index updates (https://gitlab.com/fdroid/fdroidclient/blob/master/app/src/main/java/org/fdroid/fdroid/UpdateService.java#L170). However, it seems that this state is never entered by non-battery-powered devices (https://stackoverflow.com/questions/31533972/how-to-shift-device-in-doze-mode-android-preview-m-marshmallow), or by devices with always-on screen (https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-7.1.2_r36/services/core/java/com/android/server/job/controllers/IdleController.java#178).
Can we lift the idle requirement in future? Probably not as the default behavior, but with an additional user setting.