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

Commit 61533fdc authored by Hui Peng's avatar Hui Peng Committed by Gerrit Code Review
Browse files

Merge "[Invisalign2] Move tADDRESS_TYPE out of tBTM_SEC_BLE" into main

parents 62d16526 2ba40593
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -88,8 +88,8 @@ void acl_ble_enhanced_connection_complete(
  }

  if (peer_addr_type & BLE_ADDR_TYPE_ID_BIT)
    btm_ble_refresh_peer_resolvable_private_addr(
        address_with_type.bda, peer_rpa, tBTM_SEC_BLE::BTM_BLE_ADDR_RRA);
    btm_ble_refresh_peer_resolvable_private_addr(address_with_type.bda,
                                                 peer_rpa, BTM_BLE_ADDR_RRA);
  btm_ble_update_mode_operation(role, &address_with_type.bda, HCI_SUCCESS);

  if (role == HCI_ROLE_PERIPHERAL)
+2 −2
Original line number Diff line number Diff line
@@ -2202,7 +2202,7 @@ bool BTM_BLE_IS_RESOLVE_BDA(const RawAddress& x) {
bool acl_refresh_remote_address(const RawAddress& identity_address,
                                tBLE_ADDR_TYPE identity_address_type,
                                const RawAddress& bda,
                                tBTM_SEC_BLE::tADDRESS_TYPE rra_type,
                                tBLE_RAND_ADDR_TYPE rra_type,
                                const RawAddress& rpa) {
  tACL_CONN* p_acl = internal_.btm_bda_to_acl(bda, BT_TRANSPORT_LE);
  if (p_acl == nullptr) {
@@ -2210,7 +2210,7 @@ bool acl_refresh_remote_address(const RawAddress& identity_address,
    return false;
  }

  if (rra_type == tBTM_SEC_BLE::BTM_BLE_ADDR_PSEUDO) {
  if (rra_type == BTM_BLE_ADDR_PSEUDO) {
    /* use identity address, resolvable_private_addr is empty */
    if (rpa.IsEmpty()) {
      p_acl->active_remote_addr_type = identity_address_type;
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ bool maybe_resolve_address(RawAddress* bda, tBLE_ADDR_TYPE* bda_type) {
    if (match_rec) {
      LOG(INFO) << __func__ << ": matched and resolved random address";
      is_in_security_db = true;
      match_rec->ble.active_addr_type = tBTM_SEC_BLE::BTM_BLE_ADDR_RRA;
      match_rec->ble.active_addr_type = BTM_BLE_ADDR_RRA;
      match_rec->ble.cur_rand_addr = *bda;
      if (!btm_ble_init_pseudo_addr(match_rec, *bda)) {
        /* assign the original address to be the current report address */
+4 −5
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ bool btm_random_pseudo_to_identity_addr(RawAddress* random_pseudo,
 ******************************************************************************/
void btm_ble_refresh_peer_resolvable_private_addr(
    const RawAddress& pseudo_bda, const RawAddress& rpa,
    tBTM_SEC_BLE::tADDRESS_TYPE rra_type) {
    tBLE_RAND_ADDR_TYPE rra_type) {
  tBTM_SEC_DEV_REC* p_sec_rec = btm_find_dev(pseudo_bda);
  if (p_sec_rec == nullptr) {
    LOG_WARN("%s No matching known device in record", __func__);
@@ -304,10 +304,9 @@ void btm_ble_refresh_peer_resolvable_private_addr(

  p_sec_rec->ble.cur_rand_addr = rpa;

  if (rra_type == tBTM_SEC_BLE::BTM_BLE_ADDR_PSEUDO) {
    p_sec_rec->ble.active_addr_type = rpa.IsEmpty()
                                          ? tBTM_SEC_BLE::BTM_BLE_ADDR_STATIC
                                          : tBTM_SEC_BLE::BTM_BLE_ADDR_RRA;
  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;
  }
+1 −1
Original line number Diff line number Diff line
@@ -2549,7 +2549,7 @@ void btm_ble_process_adv_addr(RawAddress& bda, tBLE_ADDR_TYPE* addr_type) {
  if (!match && BTM_BLE_IS_RESOLVE_BDA(bda)) {
    tBTM_SEC_DEV_REC* match_rec = btm_ble_resolve_random_addr(bda);
    if (match_rec) {
      match_rec->ble.active_addr_type = tBTM_SEC_BLE::BTM_BLE_ADDR_RRA;
      match_rec->ble.active_addr_type = BTM_BLE_ADDR_RRA;
      match_rec->ble.cur_rand_addr = bda;

      if (btm_ble_init_pseudo_addr(match_rec, bda)) {
Loading