From 40354f8f5a33d24a0a79f4304cbdd4df124fc230 Mon Sep 17 00:00:00 2001 From: cpfeiffer Date: Sun, 11 Dec 2016 21:31:09 +0100 Subject: [PATCH] Some @Override --- .../service/devices/miband/AbstractMi1FirmwareInfo.java | 3 +++ .../gadgetbridge/service/devices/miband/Mi1SFirmwareInfo.java | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/AbstractMi1FirmwareInfo.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/AbstractMi1FirmwareInfo.java index e274c9ce..627ea19f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/AbstractMi1FirmwareInfo.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/AbstractMi1FirmwareInfo.java @@ -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); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/Mi1SFirmwareInfo.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/Mi1SFirmwareInfo.java index 8ef2e65d..8de13acd 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/Mi1SFirmwareInfo.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/Mi1SFirmwareInfo.java @@ -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);