Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a800f32f authored by bidsharma's avatar bidsharma
Browse files

Delete keys if SMP over BR fails

BluetoothBondStateMachine is stuck in pending command state if SMP over
BR fails. This is because the stack incorrectly thinks this is a HID
device and does not remove the incomplete keys which inturn avoids
bta_dm from sending a callback to BondStateMachine.

Bug: 243105146
Test: gd/cert/run
Tag: #refactor

Change-Id: I0a5df3829644d58a972673bb4b00bb2684c74577
parent 104d98ea
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3681,7 +3681,8 @@ static uint8_t bta_dm_ble_smp_cback(tBTM_LE_EVT event, const RawAddress& bda,
                (static_cast<uint8_t>(p_data->complt.reason))));

        if (btm_sec_is_a_bonded_dev(bda) &&
            p_data->complt.reason == SMP_CONN_TOUT) {
            p_data->complt.reason == SMP_CONN_TOUT &&
            !p_data->complt.smp_over_br) {
          // Bonded device failed to encrypt - to test this remove battery from
          // HID device right after connection, but before encryption is
          // established