SeriesGuide
SeriesGuide copied to clipboard
Android 14: fix sync not getting automatically triggered
Check emails from Stefan with details.
It appears that on Android 14 (API 34) the ContentResolver.isSyncPending(account, authority)
API always returns true
, regardless if a sync is actually pending.
It appears this happens once ContentResolver.setSyncAutomatically(account, authority, true)
is called (even before any ContentResolver.requestSync
calls).
The value does not change
- even after a sync has run (
AbstractThreadedSyncAdapter.onPerformSync
has completed) or -
ContentResolver.setSyncAutomatically(account, authority, false)
is called.
The account settings UI also always shows the (non-animated) refresh indicator:
Did not find any issues on the Google issue tracker (if that's the right one?) or online, yet. Edit: better link.
User confirmed my observations on the emulator.
Quick fix in #952
Long-term fix is probably switching to WorkManager APIs. Looks like upcoming 2.9 release is a good fit.
- https://developer.android.com/topic/libraries/architecture/workmanager
- https://developer.android.com/jetpack/androidx/releases/work#2.9.0-alpha01
Try to verify this on my own device now that Android 14 has been available for a while.
Yep, also happens on my own Samsung Android 14 device. So leaving the workaround in.