Some @Override

This commit is contained in:
cpfeiffer 2016-12-11 21:31:09 +01:00
parent 94c0d6af9d
commit 40354f8f5a
2 changed files with 4 additions and 0 deletions

View File

@ -41,10 +41,12 @@ public abstract class AbstractMi1FirmwareInfo extends AbstractMiFirmwareInfo {
return 0;
}
@Override
public int getFirmwareLength() {
return wholeFirmwareBytes.length;
}
@Override
public int getFirmwareVersion() {
return (wholeFirmwareBytes[getOffsetFirmwareVersionMajor()] << 24)
| (wholeFirmwareBytes[getOffsetFirmwareVersionMinor()] << 16)
@ -89,6 +91,7 @@ public abstract class AbstractMi1FirmwareInfo extends AbstractMiFirmwareInfo {
return false;
}
@Override
protected boolean isHeaderValid() {
// TODO: not sure if this is a correct check!
return ArrayUtils.equals(SINGLE_FW_HEADER, wholeFirmwareBytes, SINGLE_FW_HEADER_OFFSET, SINGLE_FW_HEADER_OFFSET + SINGLE_FW_HEADER.length);

View File

@ -38,6 +38,7 @@ public class Mi1SFirmwareInfo extends CompositeMiFirmwareInfo {
return false;
}
@Override
protected boolean isHeaderValid() {
// TODO: not sure if this is a correct check!
return ArrayUtils.equals(DOUBLE_FW_HEADER, wholeFirmwareBytes, DOUBLE_FW_HEADER_OFFSET, DOUBLE_FW_HEADER_OFFSET + DOUBLE_FW_HEADER.length);