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

Commit fd149695 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Log when read remote name request callbacks are not sent am: 369ef621 am:...

Log when read remote name request callbacks are not sent am: 369ef621 am: 4fe06fb7 am: e5bde22b

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2318867



Change-Id: I52662d1799fa4a6fc938fbcb3c93d85fbb94a6e2
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 84b44bc9 e5bde22b
Loading
Loading
Loading
Loading
+22 −7
Original line number Diff line number Diff line
@@ -2330,9 +2330,17 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,

    /* Notify all clients waiting for name to be resolved */
    for (i = 0; i < BTM_SEC_MAX_RMT_NAME_CALLBACKS; i++) {
      if (btm_cb.p_rmt_name_callback[i] && p_bd_addr)
      if (btm_cb.p_rmt_name_callback[i]) {
        if (p_bd_addr) {
          (*btm_cb.p_rmt_name_callback[i])(*p_bd_addr, p_dev_rec->dev_class,
                                           p_dev_rec->sec_bd_name);
        } else {
          // TODO Still need to send status back to get SDP state machine
          // running
          LOG_ERROR("Unable to issue callback with unknown address status:%s",
                    hci_status_code_text(status).c_str());
        }
      }
    }
  } else {
    LOG_DEBUG(
@@ -2344,11 +2352,18 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
    /* Notify all clients waiting for name to be resolved even if not found so
     * clients can continue */
    for (i = 0; i < BTM_SEC_MAX_RMT_NAME_CALLBACKS; i++) {
      if (btm_cb.p_rmt_name_callback[i] && p_bd_addr)
      if (btm_cb.p_rmt_name_callback[i]) {
        if (p_bd_addr) {
          (*btm_cb.p_rmt_name_callback[i])(*p_bd_addr, (uint8_t*)kDevClassEmpty,
                                           (uint8_t*)kBtmBdNameEmpty);
        } else {
          // TODO Still need to send status back to get SDP state machine
          // running
          LOG_ERROR("Unable to issue callback with unknown address status:%s",
                    hci_status_code_text(status).c_str());
        }
      }
    }

    return;
  }