From 20c37dd89c98c64e50bb07cec0fa13de51f3d5a2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 9 Feb 2022 20:05:47 +0100 Subject: [PATCH] catch and show errors thrown at updating event types --- .../com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt index 510d351c6..34608deec 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt @@ -107,6 +107,8 @@ class CalDAVHelper(val context: Context) { context.contentResolver.update(uri, values, null, null) context.eventTypesDB.insertOrUpdate(eventType) } catch (e: IllegalArgumentException) { + } catch (e: SecurityException) { + context.showErrorToast(e) } }