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

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

Streamline btm_ble_refresh_peer_resolvable_private_addr am: 3499ab83

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1413992

Change-Id: I1895e6b872624efba324df12dc347e59713c9c85
parents cbf71503 3499ab83
Loading
Loading
Loading
Loading
+10 −13
Original line number Diff line number Diff line
@@ -316,23 +316,20 @@ void btm_ble_refresh_peer_resolvable_private_addr(const RawAddress& pseudo_bda,
                                                  const RawAddress& rpa,
                                                  uint8_t rra_type) {
  tBTM_SEC_DEV_REC* p_sec_rec = btm_find_dev(pseudo_bda);
  if (p_sec_rec != NULL) {
  if (p_sec_rec == nullptr) {
    LOG_WARN("%s No matching known device in record", __func__);
    return;
  }

  p_sec_rec->ble.cur_rand_addr = rpa;

    /* unknown, if dummy address, set to static */
    if (rra_type == BTM_BLE_ADDR_PSEUDO)
  if (rra_type == BTM_BLE_ADDR_PSEUDO) {
    p_sec_rec->ble.active_addr_type =
        rpa.IsEmpty() ? BTM_BLE_ADDR_STATIC : BTM_BLE_ADDR_RRA;
    else
      p_sec_rec->ble.active_addr_type = rra_type;
  } else {
    BTM_TRACE_ERROR("No matching known device in record");
    return;
    p_sec_rec->ble.active_addr_type = rra_type;
  }

  BTM_TRACE_DEBUG("%s: active_addr_type: %d ", __func__,
                  p_sec_rec->ble.active_addr_type);

  /* connection refresh remote address */
  if (!acl_refresh_remote_address(p_sec_rec, p_sec_rec->bd_addr, rra_type,
                                  rpa)) {