Remove/revert some temporary test code

here
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)) {
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;

View File

@ -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;
}
}

View File

@ -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;
}
}