From 21b97a9276bd44cd491763808c84b15cc16e472b Mon Sep 17 00:00:00 2001 From: Damien 'Psolyca' Gaignon Date: Thu, 8 Feb 2024 11:25:11 +0100 Subject: [PATCH] [Huawei] Fix BondParamsRequest stopChain --- .../devices/huawei/requests/GetBondParamsRequest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/requests/GetBondParamsRequest.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/requests/GetBondParamsRequest.java index e4b5ba211..d1fab7c4b 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/requests/GetBondParamsRequest.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huawei/requests/GetBondParamsRequest.java @@ -55,9 +55,10 @@ public class GetBondParamsRequest extends Request { throw new ResponseTypeMismatchException(receivedPacket, DeviceConfig.BondParams.Response.class); paramsProvider.setEncryptionCounter(((DeviceConfig.BondParams.Response) receivedPacket).encryptionCounter); - int status = ((DeviceConfig.BondParams.Response) receivedPacket).status; - if (status == 1) { - stopChain(this); + if (paramsProvider.getDeviceSupportType() != 0x02) { + if (((DeviceConfig.BondParams.Response) receivedPacket).status == 1) { + stopChain(this); + } } } }