gggard / AndroidCaldavSyncAdapater

Caldav synch adapter for Android
246 stars 88 forks source link

SyncAdapter.checkDirtyAndroidEvents(...) - deleted record issues #190

Open ridgeworks opened 10 years ago

ridgeworks commented 10 years ago

In unrelated testing with iCloud, I noticed a couple of issues with the code processing dirty deleted records in checkDirtyAndroidEvents:

  1. 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.
  2. 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.