From 9042966a40c0d49e6003f65e304926477c04fa2c Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Tue, 23 Jul 2019 22:42:30 +0200 Subject: [PATCH] Mi Band 4: Fix empty notifications Icon still missing --- .../service/devices/huami/amazfitbip/AmazfitBipSupport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/AmazfitBipSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/AmazfitBipSupport.java index 8e5d8dc2d..787702c6c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/AmazfitBipSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/AmazfitBipSupport.java @@ -44,6 +44,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiWeatherConditions import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbip.AmazfitBipFWHelper; import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbip.AmazfitBipService; import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst; +import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; import nodomain.freeyourgadget.gadgetbridge.model.CallSpec; import nodomain.freeyourgadget.gadgetbridge.model.DeviceType; import nodomain.freeyourgadget.gadgetbridge.model.NotificationSpec; @@ -143,7 +144,7 @@ public class AmazfitBipSupport extends HuamiSupport { byte[] command = new byte[length + prefixlength + suffixlength]; command[0] = (byte) alertCategory.getId(); - command[1] = 1; + command[1] = (byte) (gbDevice.getType() == DeviceType.MIBAND4 ? 0 : 1); // FIXME: remove hack if (alertCategory == AlertCategory.CustomHuami) { command[2] = customIconId; }