From 2ee17bd52f9b7776db65c15919797443f79fee13 Mon Sep 17 00:00:00 2001 From: Me7c7 Date: Thu, 3 Oct 2024 18:32:51 +0300 Subject: [PATCH] Huawei: Fixed calendar event deletion when birthday sync is enabled. --- .../service/devices/huawei/p2p/HuaweiP2PCalendarService.java | 2 +- .../gadgetbridge/util/calendar/CalendarManager.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/p2p/HuaweiP2PCalendarService.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/p2p/HuaweiP2PCalendarService.java index c70614cfb..beeece884 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/p2p/HuaweiP2PCalendarService.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/p2p/HuaweiP2PCalendarService.java @@ -178,7 +178,7 @@ public class HuaweiP2PCalendarService extends HuaweiBaseP2PService { ret.addProperty("all_day", calendarEvent.isAllDay() ? 1 : 0); ret.addProperty("calendar_color", calendarEvent.getColor()); ret.addProperty("calendar_displayName", truncateToHexBytes(calendarEvent.getCalName(), 64)); - ret.addProperty("calendar_id", valueOrEmpty(calendarEvent.getCalendarId(), "")); + ret.addProperty("calendar_id", valueOrEmpty(calendarEvent.getCalendarId(), "0")); ret.addProperty("description", truncateToHexBytes(calendarEvent.getDescription(), 512)); ret.addProperty("dtend", calendarEvent.getEnd()); ret.addProperty("dtstart", calendarEvent.getBegin()); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/calendar/CalendarManager.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/calendar/CalendarManager.java index 0f952af97..b9b695f86 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/calendar/CalendarManager.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/calendar/CalendarManager.java @@ -224,7 +224,7 @@ public class CalendarManager { 0, true, null, - null, + CalendarContract.ACCOUNT_TYPE_LOCAL, null, null ));