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

Commit 17201e39 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "stack::sec::btm_sec_rmt_name_request_complete Move...

Merge "stack::sec::btm_sec_rmt_name_request_complete Move declaration/assignment to usage" into main am: b754b5b2 am: 283512c1

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



Change-Id: I15a022f462ac313a2bac4a8366729cb62dfd8ce6
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7ae60440 283512c1
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -2280,9 +2280,6 @@ static void call_registered_rmt_name_callbacks(const RawAddress* p_bd_addr,
void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
                                       const uint8_t* p_bd_name,
                                       tHCI_STATUS status) {
  tBTM_SEC_DEV_REC* p_dev_rec = nullptr;
  uint8_t old_sec_state;

  log::info("btm_sec_rmt_name_request_complete for {}",
            p_bd_addr ? ADDRESS_TO_LOGGABLE_CSTR(*p_bd_addr) : "null");

@@ -2295,6 +2292,7 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,

  /* If remote name request failed, p_bd_addr is null and we need to search */
  /* based on state assuming that we are doing 1 at a time */
  tBTM_SEC_DEV_REC* p_dev_rec = nullptr;
  if (p_bd_addr)
    p_dev_rec = btm_find_dev(*p_bd_addr);
  else {
@@ -2327,7 +2325,7 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
    return;
  }

  old_sec_state = p_dev_rec->sec_rec.sec_state;
  uint8_t old_sec_state = p_dev_rec->sec_rec.sec_state;
  if (status == HCI_SUCCESS) {
    log::debug(
        "Remote read request complete for known device pairing_state:{} "