diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miband/MiBandFWHelper.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miband/MiBandFWHelper.java index 2d796e108..ef5b7fbd5 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miband/MiBandFWHelper.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miband/MiBandFWHelper.java @@ -167,7 +167,7 @@ public class MiBandFWHelper { if (MiBandConst.MI_1A.equals(deviceHW)) { return getFirmwareVersionMajor() == 5; } - if (true || MiBandConst.MI_1S.equals(deviceHW)) { // FIXME: REMOVE TEMPORARY HACK + if (MiBandConst.MI_1S.equals(deviceHW)) { return getFirmwareVersionMajor() == 4; } return false; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/Mi1SInfo.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/Mi1SInfo.java index 6d98e522d..ea27e6eb3 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/Mi1SInfo.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/Mi1SInfo.java @@ -54,11 +54,13 @@ public class Mi1SInfo { | wholeFirmwareBytes[25] & 255; } + // FIXME: this method is wrong. We don't know a way to check if a firmware file + // contains one or more firmwares. public static boolean isSingleMiBandFirmware(byte[] wholeFirmwareBytes) { if ((wholeFirmwareBytes[7] & 255) != 1) { return false; } - return false;// FIXME: hack -- should be true! + return true; } } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/operations/UpdateFirmwareOperation.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/operations/UpdateFirmwareOperation.java index a351287cb..68da0b40c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/operations/UpdateFirmwareOperation.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/operations/UpdateFirmwareOperation.java @@ -48,7 +48,7 @@ public class UpdateFirmwareOperation extends AbstractMiBandOperation { // } updateCoordinator.initNextOperation(); - updateCoordinator.initNextOperation(); // FIXME: remove, just testing mi band fw update +// updateCoordinator.initNextOperation(); // FIXME: remove, just testing mi band 1s fw update firmwareInfoSent = updateCoordinator.sendFwInfo(); if (!firmwareInfoSent) { GB.toast(getContext(), "Error sending firmware info, aborting.", Toast.LENGTH_LONG, GB.ERROR); @@ -392,8 +392,7 @@ public class UpdateFirmwareOperation extends AbstractMiBandOperation { } public boolean needsReboot() { - return false; // FIXME: renable rebooting -// return reboot; + return reboot; } }