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

Commit 7e351248 authored by Himanshu Rawat's avatar Himanshu Rawat Committed by Gerrit Code Review
Browse files

Merge "Don't remove the HOGP device if remote device does not have LTK."

parents b634177f 5a7584b3
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -4584,17 +4584,6 @@ static void bta_dm_ctrl_features_rd_cmpl_cback(tHCI_STATUS result) {
}
#endif /* BLE_VND_INCLUDED */

void bta_dm_process_delete_key_RC_to_unpair(const RawAddress& bd_addr)
{
    LOG_WARN("RC key missing");
    tBTA_DM_SEC param = {
        .delete_key_RC_to_unpair = {
            .bd_addr = bd_addr,
        },
    };
    bta_dm_cb.p_sec_cback(BTA_DM_REPORT_BONDING_EVT, &param);
}

/*******************************************************************************
 *
 * Function         bta_dm_ble_subrate_request
+1 −2
Original line number Diff line number Diff line
@@ -80,7 +80,6 @@ static void bta_hh_le_add_dev_bg_conn(tBTA_HH_DEV_CB* p_cb, bool check_bond);
static void bta_hh_process_cache_rpt(tBTA_HH_DEV_CB* p_cb,
                                     tBTA_HH_RPT_CACHE_ENTRY* p_rpt_cache,
                                     uint8_t num_rpt);
extern void bta_dm_process_delete_key_RC_to_unpair(const RawAddress& bd_addr);

static const char* bta_hh_le_rpt_name[4] = {"UNKNOWN", "INPUT", "OUTPUT",
                                            "FEATURE"};
@@ -1009,7 +1008,7 @@ void bta_hh_security_cmpl(tBTA_HH_DEV_CB* p_cb,
    LOG_ERROR("Received encryption failed status:%s btm_status:%s",
              bta_hh_status_text(p_cb->status).c_str(),
              btm_status_text(p_cb->btm_status).c_str());
    bta_dm_process_delete_key_RC_to_unpair(p_cb->addr);
    bta_hh_le_api_disc_act(p_cb);
  } else {
    LOG_ERROR("Encryption failed status:%s btm_status:%s",
              bta_hh_status_text(p_cb->status).c_str(),
+0 −9
Original line number Diff line number Diff line
@@ -2283,15 +2283,6 @@ static void btif_dm_upstreams_evt(uint16_t event, char* p_param) {
    case BTA_DM_LE_FEATURES_READ:
      btif_get_adapter_property(BT_PROPERTY_LOCAL_LE_FEATURES);
      break;
    /* add case for HANDLE_KEY_MISSING */
    case BTA_DM_REPORT_BONDING_EVT:
      LOG_WARN("Received encryption failed: Report bonding firstly.");
      bd_addr = p_data->delete_key_RC_to_unpair.bd_addr;
      GetInterfaceToProfiles()->events->invoke_bond_state_changed_cb(
          BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_BONDING,
          pairing_cb.fail_reason);
      btif_dm_remove_bond(bd_addr);
      break;

    case BTA_DM_LE_ADDR_ASSOC_EVT:
      GetInterfaceToProfiles()->events->invoke_le_address_associate_cb(
+0 −1
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@ const char* dump_dm_event(uint16_t event) {
    CASE_RETURN_STR(BTA_DM_BLE_AUTH_CMPL_EVT)
    CASE_RETURN_STR(BTA_DM_DEV_UNPAIRED_EVT)
    CASE_RETURN_STR(BTA_DM_ENER_INFO_READ)
    CASE_RETURN_STR(BTA_DM_REPORT_BONDING_EVT)

    default:
      return "UNKNOWN DM EVENT";
+0 −1
Original line number Diff line number Diff line
@@ -290,7 +290,6 @@ TEST_F(BtifCoreTest, dump_dm_event) {
      std::make_pair(BTA_DM_BLE_AUTH_CMPL_EVT, "BTA_DM_BLE_AUTH_CMPL_EVT"),
      std::make_pair(BTA_DM_DEV_UNPAIRED_EVT, "BTA_DM_DEV_UNPAIRED_EVT"),
      std::make_pair(BTA_DM_ENER_INFO_READ, "BTA_DM_ENER_INFO_READ"),
      std::make_pair(BTA_DM_REPORT_BONDING_EVT, "BTA_DM_REPORT_BONDING_EVT"),
  };
  for (const auto& event : events) {
    ASSERT_STREQ(event.second.c_str(), dump_dm_event(event.first));
Loading