I see. However - all the other apps then don’t respect the battery saving mode where background syncs should not be running to save the battery…
Automatic sync disabled
- ICS 1.8.9 (build source code from gitlab.com with AndroidStudio)
- Android 8.1
- one https calendar
Calendar sync is always disabled. After setting the sync interval to 1 hour Snackbar shows “Automatic sync disabled” and the calendar is never synced.
Re-entering the sync interval dialog it shows “Only manually”
in at/bitfire/icsdroid/ui/CalendarListActivity.kt line 136ff:
It seems that AppAccount.syncInterval(this) == AppAccount.SYNC_INTERVAL_MANUALLY is always true and !ContentResolver.getMasterSyncAutomatically() is always false on my device (unbelievable but true)
First I added ContentResolver.setMasterSyncAutomatically(true) and executed it once sync worked as expected. Even after I reverted my change.
Then I added ContentResolver.setMasterSyncAutomatically(false) somewhere in the code and the notification calendar_list_master_sync_disabled was shown (as expected).
It seems that master sync is off and ContentResolver.getMasterSyncAutomatically() is true when ContentResolver.setMasterSyncAutomatically was never called on a device (unbelievable ?).
I can still reproduce the problem on another device where ContentResolver.setMasterSyncAutomatically was never executed.
Which device do you have? And which firmware?
thanks for the fast response.
I use the original firmware on a Nexus 5X (Android 8.1.0) and
a Samsung S7 (Android 8.0.0, security patch 1. July 2020)
On the Samsung S7 I have never installed anything unusual. k9mail and more is installed on my Nexus 5X.
ContentResolver.getMasterSyncAutomatically(ContentResolver.getMasterSyncAutomatically()) would help but I am mot sure if ICSx⁵ is the best place for it.