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

Commit d29acd09 authored by Myles Watson's avatar Myles Watson Committed by Automerger Merge Worker
Browse files

Remove pairing on incoming bond request am: 9f094224 am: d957be28 am: 72d70226

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/11922796

Change-Id: I61ab971764bdb4b58cec261428c5bb8c2f3ed9b0
parents 3fcce6a6 72d70226
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -58,6 +58,7 @@ bool(APPL_AUTH_WRITE_EXCEPTION)(const RawAddress& bd_addr);
extern void btm_ble_advertiser_notify_terminated_legacy(
extern void btm_ble_advertiser_notify_terminated_legacy(
    uint8_t status, uint16_t connection_handle);
    uint8_t status, uint16_t connection_handle);
extern void bta_dm_remove_device(const RawAddress& bd_addr);
extern void bta_dm_remove_device(const RawAddress& bd_addr);
extern void bta_dm_process_remove_device(const RawAddress& bd_addr);


/*******************************************************************************
/*******************************************************************************
 *             L O C A L    F U N C T I O N     P R O T O T Y P E S            *
 *             L O C A L    F U N C T I O N     P R O T O T Y P E S            *
@@ -2931,6 +2932,13 @@ void btm_io_capabilities_req(const RawAddress& p) {
  BTM_TRACE_EVENT("%s: State: %s", __func__,
  BTM_TRACE_EVENT("%s: State: %s", __func__,
                  btm_pair_state_descr(btm_cb.pairing_state));
                  btm_pair_state_descr(btm_cb.pairing_state));


  if (btm_sec_is_a_bonded_dev(p)) {
    BTM_TRACE_WARNING(
        "%s: Incoming bond request, but %s is already bonded (removing)",
        __func__, p.ToString().c_str());
    bta_dm_process_remove_device(p);
  }

  p_dev_rec = btm_find_or_alloc_dev(evt_data.bd_addr);
  p_dev_rec = btm_find_or_alloc_dev(evt_data.bd_addr);


  BTM_TRACE_DEBUG("%s:Security mode: %d, Num Read Remote Feat pages: %d",
  BTM_TRACE_DEBUG("%s:Security mode: %d, Num Read Remote Feat pages: %d",