From f4bc2ed6afdf18c048641fb9f2fd72312b903b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Tue, 17 Dec 2024 18:43:44 +0000 Subject: [PATCH] Zepp OS 3.5+: Fix notification vibration --- .../huami/zeppos/services/ZeppOsNotificationService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/zeppos/services/ZeppOsNotificationService.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/zeppos/services/ZeppOsNotificationService.java index e4dff4700..15d658f3c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/zeppos/services/ZeppOsNotificationService.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/zeppos/services/ZeppOsNotificationService.java @@ -357,7 +357,7 @@ public class ZeppOsNotificationService extends AbstractZeppOsService { baos.write((byte) (hasReply ? 1 : 0)); if (version >= 5) { - baos.write(1); // ? + baos.write(0); // 1 for silent } if (supportsPictures) { baos.write((byte) (notificationSpec.picturePath != null ? 1 : 0)); @@ -366,7 +366,9 @@ public class ZeppOsNotificationService extends AbstractZeppOsService { } } if (supportsNotificationKey) { - baos.write(notificationSpec.key.getBytes(StandardCharsets.UTF_8)); + if (notificationSpec.key != null) { + baos.write(notificationSpec.key.getBytes(StandardCharsets.UTF_8)); + } baos.write(0); }