AndroidCaldavSyncAdapater
AndroidCaldavSyncAdapater copied to clipboard
SyncAdapter.checkDirtyAndroidEvents(...) - deleted record issues
In unrelated testing with iCloud, I noticed a couple of issues with the code processing dirty deleted records in checkDirtyAndroidEvents:
- The current implementation doesn't reset the DIRTY field in DELETED records. so the deleted events appear to remain in the calendar (although they're not visible to the user). More of an overhead issue since they keep getting deleted each time the method is called.
- If the local calendar ever gets out of sync with the server such that an event is present locally but has been deleted on the server, attempts to delete it locally won't fully work. This occurs because the call to facade.deleteEvent(...) will fail, so the DIRTY, DELETED event doesn't ever get fully deleted. Same overhead issues as above. Probably the return value from facade.deleteEvent(...) should just be ignored.