From 4d5141c7659a2ddfdc0cfece58dd0bb411f337ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Sat, 23 Nov 2024 23:40:24 +0000 Subject: [PATCH] Zepp OS: Fix TGA id --- .../huami/zeppos/services/ZeppOsNotificationService.java | 4 ++-- 1 file changed, 2 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 03f52e594..46ca49b8b 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 @@ -25,6 +25,7 @@ import android.graphics.drawable.Drawable; import androidx.annotation.Nullable; import org.slf4j.Logger; + import org.slf4j.LoggerFactory; import java.io.ByteArrayOutputStream; @@ -555,8 +556,7 @@ public class ZeppOsNotificationService extends AbstractZeppOsService { // but the encoding seems to actually be the same...? // The TGA needs to have this ID, or the band does not accept it final byte[] tgaIdBytes = new byte[46]; - //System.arraycopy(format.getTgaId().getBytes(StandardCharsets.UTF_8), 0, tgaIdBytes, 0, 5); - System.arraycopy(GB.hexStringToByteArray("534F4D486601"), 0, tgaIdBytes, 0, 6); + System.arraycopy(format.getTgaId().getBytes(StandardCharsets.UTF_8), 0, tgaIdBytes, 0, 5); return BitmapUtil.convertToTgaRGB565(bmp, width, height, tgaIdBytes); }