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

Commit 98afb210 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Don't call BTA_DM_DISC_RES_EVT for GATT over LE services

GATT over LE services are already reported in BTA_DM_GATT_OVER_LE_RES_EVT
no need to report them again. Also, calling BTA_DM_DISC_RES_EVT here
might mess up SDP retry counter sdp_attempts in btif_dm.cc. It should be
invoked just for SDP.

Bug: 248340112
Test: Pair with BLE and Dual mode device, ensure services are discovered
and reported
Merged-In: I3261cbd1b80e50689178db2487154df1ad4c3557
Change-Id: I3261cbd1b80e50689178db2487154df1ad4c3557

Change-Id: I6b579f9b7f75677146645ded84fc46236cb00885
parent 273843ce
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1357,8 +1357,13 @@ void bta_dm_search_cmpl() {
void bta_dm_disc_result(tBTA_DM_MSG* p_data) {
  APPL_TRACE_EVENT("%s", __func__);

  /* disc_res.device_type is set only when GATT discovery is finished in
   * bta_dm_gatt_disc_complete */
  bool is_gatt_over_ble = ((p_data->disc_result.result.disc_res.device_type &
                            BT_DEVICE_TYPE_BLE) != 0);

  /* if any BR/EDR service discovery has been done, report the event */
  if ((bta_dm_search_cb.services &
  if (!is_gatt_over_ble && (bta_dm_search_cb.services &
                            ((BTA_ALL_SERVICE_MASK | BTA_USER_SERVICE_MASK) &
                             ~BTA_BLE_SERVICE_MASK)))
    bta_dm_search_cb.p_search_cback(BTA_DM_DISC_RES_EVT,