diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java index 20dcbef9..0ca7861d 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java @@ -741,11 +741,6 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport { } LOG.info("handleControlPoint got status:" + status); - if (getDevice().isBusy()) { - if (isActivityDataSyncFinished(value)) { - unsetBusy(); - } - } if (value != null) { for (byte b : value) { LOG.info("handleControlPoint GOT DATA:" + String.format("0x%8x", b)); @@ -755,19 +750,6 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport { } } - private boolean isActivityDataSyncFinished(byte[] value) { - // byte 0 is the kind of message - // byte 1 to 6 represent a timestamp - // byte 7 to 8 represent the amount of data left (0 = done) - LOG.info("finished?: " + GB.hexdump(value, 0, -1)); - if (value.length == 9) { - if (value[0] == 0xa && value[7] == 0 && value[8] == 0) { - return true; - } - } - return false; - } - private void unsetBusy() { getDevice().unsetBusyTask(); getDevice().sendDeviceUpdateIntent(getContext());