1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2025-01-12 18:57:36 +01:00

Huawei: Fix notifications for Huawei Band 3 pro

This commit is contained in:
Martin.JM 2024-11-29 13:37:54 +01:00
parent 287a759e28
commit 55014fd13a

View File

@ -75,21 +75,21 @@ public class Notifications {
.put(0x03, true); // This used to be vibrate, but doesn't work .put(0x03, true); // This used to be vibrate, but doesn't work
HuaweiTLV subTlv = new HuaweiTLV(); HuaweiTLV subTlv = new HuaweiTLV();
if (titleContent != null) if (titleContent != null && !titleContent.isEmpty())
subTlv.put(0x8D, new HuaweiTLV() subTlv.put(0x8D, new HuaweiTLV()
.put(0x0E, (byte) TextType.title) .put(0x0E, (byte) TextType.title)
.put(0x0F, (byte) encoding) .put(0x0F, (byte) encoding)
.put(0x10, titleContent) .put(0x10, titleContent)
); );
if (senderContent != null) if (senderContent != null && !senderContent.isEmpty())
subTlv.put(0x8D, new HuaweiTLV() subTlv.put(0x8D, new HuaweiTLV()
.put(0x0E, (byte) TextType.sender) .put(0x0E, (byte) TextType.sender)
.put(0x0F, (byte) encoding) .put(0x0F, (byte) encoding)
.put(0x10, senderContent) .put(0x10, senderContent)
); );
if (bodyContent != null) if (bodyContent != null && !bodyContent.isEmpty())
subTlv.put(0x8D, new HuaweiTLV() subTlv.put(0x8D, new HuaweiTLV()
.put(0x0E, (byte) TextType.text) .put(0x0E, (byte) TextType.text)
.put(0x0F, (byte) encoding) .put(0x0F, (byte) encoding)