mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
catch exceptions thrown at deleting CalDAV events
This commit is contained in:
@@ -364,7 +364,11 @@ class CalDAVHandler(val context: Context) {
|
|||||||
fun deleteCalDAVEvent(event: Event) {
|
fun deleteCalDAVEvent(event: Event) {
|
||||||
val uri = CalendarContract.Events.CONTENT_URI
|
val uri = CalendarContract.Events.CONTENT_URI
|
||||||
val contentUri = ContentUris.withAppendedId(uri, event.getCalDAVEventId())
|
val contentUri = ContentUris.withAppendedId(uri, event.getCalDAVEventId())
|
||||||
|
try {
|
||||||
context.contentResolver.delete(contentUri, null, null)
|
context.contentResolver.delete(contentUri, null, null)
|
||||||
|
} catch (ignored: SecurityException) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getCalDAVEventReminders(eventId: Long): List<Int> {
|
private fun getCalDAVEventReminders(eventId: Long): List<Int> {
|
||||||
|
Reference in New Issue
Block a user