From fbbc2afda4cf3439f7aa2569ea4747196cf02e24 Mon Sep 17 00:00:00 2001 From: Daniele Gobbetti Date: Fri, 31 Jul 2015 11:28:03 +0200 Subject: [PATCH] Add a timeout of 1 second before rebooting after firmware update. --- .../freeyourgadget/gadgetbridge/miband/MiBandSupport.java | 1 + 1 file changed, 1 insertion(+) 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 37299c5c..a029d4c2 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java @@ -946,6 +946,7 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport { LOG.info("Firmware update progress:" + firmwareProgress + " total len:" + len + " progress:" + (firmwareProgress / len)); if (firmwareProgress >= len) { builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT), new byte[]{MiBandService.COMMAND_SYNC}); + builder.wait(1000); builder.add(new SetProgressAction("Firmware installation complete", false, 100, getContext())); } else { GB.updateInstallNotification("Firmware write failed", false, 0, getContext());