From b242ad1ec56aba4b73c3709226927dd49a4d58f9 Mon Sep 17 00:00:00 2001 From: "Martin.JM" Date: Thu, 1 Aug 2024 21:06:13 +0200 Subject: [PATCH] Huawei: Expand capabilities fix --- .../gadgetbridge/devices/huawei/HuaweiCoordinator.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiCoordinator.java index 2c1673079..4224fef90 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huawei/HuaweiCoordinator.java @@ -175,6 +175,10 @@ public class HuaweiCoordinator { // capability is a number containing : // - the index of the "service" // - the real capability number + if (expandCapabilities == null) { + LOG.debug("Expand capabilities is null"); + return false; + } if (which >= expandCapabilities.length * 8) { LOG.debug("Capability is not supported"); return false;