From 071a2362a78f79cc537812457e240c40a86bb5a5 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 11 Aug 2024 09:33:07 +0200 Subject: [PATCH] Update event with no duration --- .../main/java/eu/faircode/email/CalendarHelper.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/CalendarHelper.java b/app/src/main/java/eu/faircode/email/CalendarHelper.java index 6de8e47927..7c1229ea2e 100644 --- a/app/src/main/java/eu/faircode/email/CalendarHelper.java +++ b/app/src/main/java/eu/faircode/email/CalendarHelper.java @@ -281,6 +281,17 @@ public class CalendarHelper { " location=" + location + " status=" + status); } else { + /* + java.lang.IllegalArgumentException: Cannot have both DTEND and DURATION in an event + at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172) + at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142) + at android.content.ContentProviderProxy.update(ContentProviderNative.java:685) + at android.content.ContentResolver.update(ContentResolver.java:2416) + at android.content.ContentResolver.update(ContentResolver.java:2378) + at eu.faircode.email.CalendarHelper.insert(CalendarHelper:285) + */ + values.put(CalendarContract.Events.DURATION, ""); + Uri uri = ContentUris.withAppendedId(CalendarContract.Events.CONTENT_URI, existId); int rows = resolver.update(uri, values, null, null); EntityLog.log(context, EntityLog.Type.General, message, "Updated event" +