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

Commit 31e3d319 authored by Venkata Jagadeesh Garaga's avatar Venkata Jagadeesh Garaga Committed by android-build-merger
Browse files

Remove the remote from paired list when auth fails

am: d107af3b

Change-Id: I5c0d47a55b13e2b4bf13678edcb45e01584d8cad
parents eb4a936b d107af3b
Loading
Loading
Loading
Loading
+15 −16
Original line number Diff line number Diff line
@@ -1054,13 +1054,14 @@ static void btif_dm_auth_cmpl_evt(tBTA_DM_AUTH_CMPL* p_auth_cmpl) {
    }
  }

  if (p_auth_cmpl->success) {
    // We could have received a new link key without going through the pairing
    // flow.  If so, we don't want to perform SDP or any other operations on the
  // authenticated device. Also, make sure that the link key is not derived from
  // secure LTK, because we will need to perform SDP in case of link key
  // derivation to allow bond state change notification for the BR/EDR transport
  // so that the subsequent BR/EDR connections to the remote can use the derived
  // link key.
    // authenticated device. Also, make sure that the link key is not derived
    // from secure LTK, because we will need to perform SDP in case of link key
    // derivation to allow bond state change notification for the BR/EDR
    // transport so that the subsequent BR/EDR connections to the remote can use
    // the derived link key.
    if (p_auth_cmpl->bd_addr != pairing_cb.bd_addr &&
        (!pairing_cb.ble.is_penc_key_rcvd)) {
      LOG(INFO) << __func__
@@ -1069,8 +1070,6 @@ static void btif_dm_auth_cmpl_evt(tBTA_DM_AUTH_CMPL* p_auth_cmpl) {
      return;
    }

  // Skip SDP for certain  HID Devices
  if (p_auth_cmpl->success) {
    btif_storage_set_remote_addr_type(&bd_addr, p_auth_cmpl->addr_type);
    btif_update_remote_properties(p_auth_cmpl->bd_addr, p_auth_cmpl->bd_name,
                                  NULL, p_auth_cmpl->dev_type);