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:
parent
0e5545191d
commit
0ed9e5b1a8
@ -400,12 +400,16 @@ public class HuaweiSupportProvider {
|
|||||||
try {
|
try {
|
||||||
createSecretKey();
|
createSecretKey();
|
||||||
GetAuthRequest authReq = new GetAuthRequest(this, linkParamsReq);
|
GetAuthRequest authReq = new GetAuthRequest(this, linkParamsReq);
|
||||||
|
if (getHuaweiType() == HuaweiDeviceType.BLE) {
|
||||||
GetBondParamsRequest bondParamsReq = new GetBondParamsRequest(this);
|
GetBondParamsRequest bondParamsReq = new GetBondParamsRequest(this);
|
||||||
GetBondRequest bondReq = new GetBondRequest(this);
|
GetBondRequest bondReq = new GetBondRequest(this);
|
||||||
authReq.nextRequest(bondParamsReq);
|
authReq.nextRequest(bondParamsReq);
|
||||||
bondParamsReq.nextRequest(bondReq);
|
bondParamsReq.nextRequest(bondReq);
|
||||||
bondParamsReq.setFinalizeReq(configureReq);
|
bondParamsReq.setFinalizeReq(configureReq);
|
||||||
bondReq.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);
|
||||||
|
Loading…
Reference in New Issue
Block a user