1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 10:35:50 +01:00

Zepp OS: Send calendar event location

This commit is contained in:
José Rebelo 2023-08-18 08:53:51 +01:00
parent c8e19a2466
commit 3fae1accb1

View File

@ -122,6 +122,9 @@ public class ZeppOsCalendarService extends AbstractZeppOsService {
}
if (version == 3) {
if (calendarEventSpec.location != null) {
length += calendarEventSpec.location.getBytes(StandardCharsets.UTF_8).length;
}
// Extra null byte at the end
length++;
}
@ -169,7 +172,10 @@ public class ZeppOsCalendarService extends AbstractZeppOsService {
// TODO: Description here
if (version == 3) {
buf.put((byte) 0x00); // ?
if (calendarEventSpec.location != null) {
buf.put(calendarEventSpec.location.getBytes(StandardCharsets.UTF_8));
}
buf.put((byte) 0x00);
}
write("add calendar event", buf.array());