1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-25 03:16:51 +01: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 { try {
createSecretKey(); createSecretKey();
GetAuthRequest authReq = new GetAuthRequest(this, linkParamsReq); GetAuthRequest authReq = new GetAuthRequest(this, linkParamsReq);
GetBondParamsRequest bondParamsReq = new GetBondParamsRequest(this); if (getHuaweiType() == HuaweiDeviceType.BLE) {
GetBondRequest bondReq = new GetBondRequest(this); GetBondParamsRequest bondParamsReq = new GetBondParamsRequest(this);
authReq.nextRequest(bondParamsReq); GetBondRequest bondReq = new GetBondRequest(this);
bondParamsReq.nextRequest(bondReq); authReq.nextRequest(bondParamsReq);
bondParamsReq.setFinalizeReq(configureReq); bondParamsReq.nextRequest(bondReq);
bondReq.setFinalizeReq(configureReq); bondParamsReq.setFinalizeReq(configureReq);
bondReq.setFinalizeReq(configureReq);
} else {
authReq.setFinalizeReq(configureReq);
}
authReq.doPerform(); authReq.doPerform();
} catch (IOException e) { } catch (IOException e) {
GB.toast(context, "init Normal Mode of Huawei device failed", Toast.LENGTH_SHORT, GB.ERROR, e); GB.toast(context, "init Normal Mode of Huawei device failed", Toast.LENGTH_SHORT, GB.ERROR, e);