diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/operations/FetchActivityOperation.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/operations/FetchActivityOperation.java index b526ec314..082fbfa8a 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/operations/FetchActivityOperation.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/operations/FetchActivityOperation.java @@ -151,15 +151,13 @@ public class FetchActivityOperation extends AbstractMiBand1Operation { private ActivityStruct activityStruct; - public FetchActivityOperation(MiBandSupport support) { + public FetchActivityOperation(MiBandSupport support) throws IOException { super(support); if (support == null) { - LOG.error("MiBandSupport was null"); - return; + throw new IOException("MiBandSupport was null"); } if (support.getDeviceInfo() == null) { - LOG.error("MiBandSupport getDeviceInfo returned null"); - return; + throw new IOException("MiBandSupport getDeviceInfo returned null"); } hasExtendedActivityData = support.getDeviceInfo().supportsHeartrate(); hasPacketCounter = support.getDeviceInfo().getProfileVersion() >= 0x02000700;