catch exceptions thrown at deleting CalDAV events

This commit is contained in:
tibbi
2017-08-28 16:03:30 +02:00
parent 76e159e60a
commit cfe4df64b1

View File

@@ -364,7 +364,11 @@ class CalDAVHandler(val context: Context) {
fun deleteCalDAVEvent(event: Event) {
val uri = CalendarContract.Events.CONTENT_URI
val contentUri = ContentUris.withAppendedId(uri, event.getCalDAVEventId())
context.contentResolver.delete(contentUri, null, null)
try {
context.contentResolver.delete(contentUri, null, null)
} catch (ignored: SecurityException) {
}
}
private fun getCalDAVEventReminders(eventId: Long): List<Int> {