1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-09-27 16:56:57 +02:00

Fix normal mode connection

This commit is contained in:
Damien 'Psolyca' Gaignon 2024-01-21 21:37:44 +01:00
parent 0e5545191d
commit 0ed9e5b1a8
No known key found for this signature in database
GPG Key ID: 9E9404E5D9E11843

View File

@ -400,12 +400,16 @@ public class HuaweiSupportProvider {
try {
createSecretKey();
GetAuthRequest authReq = new GetAuthRequest(this, linkParamsReq);
GetBondParamsRequest bondParamsReq = new GetBondParamsRequest(this);
GetBondRequest bondReq = new GetBondRequest(this);
authReq.nextRequest(bondParamsReq);
bondParamsReq.nextRequest(bondReq);
bondParamsReq.setFinalizeReq(configureReq);
bondReq.setFinalizeReq(configureReq);
if (getHuaweiType() == HuaweiDeviceType.BLE) {
GetBondParamsRequest bondParamsReq = new GetBondParamsRequest(this);
GetBondRequest bondReq = new GetBondRequest(this);
authReq.nextRequest(bondParamsReq);
bondParamsReq.nextRequest(bondReq);
bondParamsReq.setFinalizeReq(configureReq);
bondReq.setFinalizeReq(configureReq);
} else {
authReq.setFinalizeReq(configureReq);
}
authReq.doPerform();
} catch (IOException e) {
GB.toast(context, "init Normal Mode of Huawei device failed", Toast.LENGTH_SHORT, GB.ERROR, e);