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

Commit cbce0aa8 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "bta_dm_disc: remove unused callback params" into main

parents ce28374b e5adf7dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -304,7 +304,7 @@ static void bta_dm_disc_result(tBTA_DM_SVC_RES& disc_result) {
          r.bd_addr, BD_NAME{}, r.gatt_uuids, /* transport_le */ false);
    }
    bta_dm_discovery_cb.service_search_cbacks.on_service_discovery_results(
        r.bd_addr, r.services, r.uuids, r.result, r.hci_status);
        r.bd_addr, r.uuids, r.result);
  } else {
    GAP_BleReadPeerPrefConnParams(bta_dm_discovery_cb.peer_bdaddr);

+1 −1
Original line number Diff line number Diff line
@@ -921,7 +921,7 @@ static void bta_dm_disc_result(tBTA_DM_SVC_RES& disc_result) {
  if (!is_gatt_over_ble) {
    auto& r = disc_result;
    bta_dm_search_cb.service_search_cbacks.on_service_discovery_results(
        r.bd_addr, r.services, r.uuids, r.result, r.hci_status);
        r.bd_addr, r.uuids, r.result);
  }

  /* Services were discovered while device search is in progress.
+2 −2
Original line number Diff line number Diff line
@@ -287,9 +287,9 @@ typedef void(tBTA_DM_DID_RES_CBACK)(RawAddress bd_addr, uint8_t vendor_id_src,
typedef void(tBTA_DM_NAME_READ_CBACK)(RawAddress bd_addr,
                                      tHCI_ERROR_CODE hci_status,
                                      const BD_NAME bd_name);
typedef void(tBTA_DM_DISC_CBACK)(RawAddress bd_addr, tBTA_SERVICE_MASK services,
typedef void(tBTA_DM_DISC_CBACK)(RawAddress bd_addr,
                                 const std::vector<bluetooth::Uuid>& uuids,
                                 tBTA_STATUS result, tHCI_STATUS hci_status);
                                 tBTA_STATUS result);
struct service_discovery_callbacks {
  tBTA_DM_GATT_DISC_CBACK* on_gatt_results;
  tBTA_DM_DID_RES_CBACK* on_did_received;
+3 −6
Original line number Diff line number Diff line
@@ -185,8 +185,7 @@ TEST_F(BtaInitializedTest,
       bta_dm_disc_start_service_discovery__BT_TRANSPORT_AUTO) {
  bta_dm_disc_start_service_discovery(
      {nullptr, nullptr, nullptr,
       [](RawAddress, tBTA_SERVICE_MASK, const std::vector<bluetooth::Uuid>&,
          tBTA_STATUS, tHCI_STATUS) {}},
       [](RawAddress, const std::vector<bluetooth::Uuid>&, tBTA_STATUS) {}},
      kRawAddress, BT_TRANSPORT_AUTO);
}

@@ -194,8 +193,7 @@ TEST_F(BtaInitializedTest,
       bta_dm_disc_start_service_discovery__BT_TRANSPORT_BR_EDR) {
  bta_dm_disc_start_service_discovery(
      {nullptr, nullptr, nullptr,
       [](RawAddress, tBTA_SERVICE_MASK, const std::vector<bluetooth::Uuid>&,
          tBTA_STATUS, tHCI_STATUS) {}},
       [](RawAddress, const std::vector<bluetooth::Uuid>&, tBTA_STATUS) {}},
      kRawAddress, BT_TRANSPORT_BR_EDR);
}

@@ -204,8 +202,7 @@ TEST_F(BtaInitializedTest,
  bta_dm_disc_start_service_discovery(
      {[](RawAddress, BD_NAME, std::vector<bluetooth::Uuid>&, bool) {}, nullptr,
       nullptr,
       [](RawAddress, tBTA_SERVICE_MASK, const std::vector<bluetooth::Uuid>&,
          tBTA_STATUS, tHCI_STATUS) {}},
       [](RawAddress, const std::vector<bluetooth::Uuid>&, tBTA_STATUS) {}},
      kRawAddress, BT_TRANSPORT_LE);
}

+2 −4
Original line number Diff line number Diff line
@@ -1696,15 +1696,13 @@ static bool btif_is_gatt_service_discovery_post_pairing(const RawAddress bd_addr
}

static void btif_on_service_discovery_results(
    RawAddress bd_addr, tBTA_SERVICE_MASK services,
    const std::vector<bluetooth::Uuid>& uuids_param, tBTA_STATUS result,
    tHCI_STATUS hci_status) {
    RawAddress bd_addr, const std::vector<bluetooth::Uuid>& uuids_param,
    tBTA_STATUS result) {
  bt_property_t prop;
  std::vector<uint8_t> property_value;
  std::set<Uuid> uuids;
  bool a2dp_sink_capable = false;

  log::verbose("result=0x{:x}, services 0x{:x}", result, services);
  if (result != BTA_SUCCESS && pairing_cb.state == BT_BOND_STATE_BONDED &&
      pairing_cb.sdp_attempts < BTIF_DM_MAX_SDP_ATTEMPTS_AFTER_PAIRING) {
    if (pairing_cb.sdp_attempts) {