From 3958f1ef95a80f723946c3756f34af4d29e8d960 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 31 Mar 2023 12:31:41 +0200 Subject: [PATCH] Auto event: fixed null bind --- app/src/main/java/eu/faircode/email/CalendarHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/CalendarHelper.java b/app/src/main/java/eu/faircode/email/CalendarHelper.java index 8a455708bf..3a64277466 100644 --- a/app/src/main/java/eu/faircode/email/CalendarHelper.java +++ b/app/src/main/java/eu/faircode/email/CalendarHelper.java @@ -81,7 +81,9 @@ public class CalendarHelper { " OR " + CalendarContract.Calendars.CALENDAR_DISPLAY_NAME + " = ?)" : CalendarContract.Calendars.CALENDAR_DISPLAY_NAME + " = ?") + " AND " + CalendarContract.Events.UID_2445 + " = ?", - new String[]{selectedAccount, selectedName, uid}, + selectedName == null + ? new String[]{selectedAccount, selectedAccount, uid} + : new String[]{selectedAccount, selectedName, uid}, null)) { if (cursor.moveToNext()) return cursor.getLong(0);