Remove/revert some temporary test code

master
cpfeiffer 2016-03-16 00:22:06 +01:00
parent e26e6d7b24
commit c5a887192d
3 changed files with 6 additions and 5 deletions

View File

@ -167,7 +167,7 @@ public class MiBandFWHelper {
if (MiBandConst.MI_1A.equals(deviceHW)) { if (MiBandConst.MI_1A.equals(deviceHW)) {
return getFirmwareVersionMajor() == 5; return getFirmwareVersionMajor() == 5;
} }
if (true || MiBandConst.MI_1S.equals(deviceHW)) { // FIXME: REMOVE TEMPORARY HACK if (MiBandConst.MI_1S.equals(deviceHW)) {
return getFirmwareVersionMajor() == 4; return getFirmwareVersionMajor() == 4;
} }
return false; return false;

View File

@ -54,11 +54,13 @@ public class Mi1SInfo {
| wholeFirmwareBytes[25] & 255; | 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) { public static boolean isSingleMiBandFirmware(byte[] wholeFirmwareBytes) {
if ((wholeFirmwareBytes[7] & 255) != 1) { if ((wholeFirmwareBytes[7] & 255) != 1) {
return false; return false;
} }
return false;// FIXME: hack -- should be true! return true;
} }
} }

View File

@ -48,7 +48,7 @@ public class UpdateFirmwareOperation extends AbstractMiBandOperation {
// } // }
updateCoordinator.initNextOperation(); 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(); firmwareInfoSent = updateCoordinator.sendFwInfo();
if (!firmwareInfoSent) { if (!firmwareInfoSent) {
GB.toast(getContext(), "Error sending firmware info, aborting.", Toast.LENGTH_LONG, GB.ERROR); 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() { public boolean needsReboot() {
return false; // FIXME: renable rebooting return reboot;
// return reboot;
} }
} }