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

Commit b3bb6926 authored by Chris Manton's avatar Chris Manton
Browse files

Move btm_ble_increment_link_topology_mask l2c=>btm

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I683d68030531bbc635c5f357a8cc356d925d40c8
parent 49cfd941
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@

void btm_ble_advertiser_notify_terminated_legacy(uint8_t status,
                                                 uint16_t connection_handle);
void btm_ble_increment_link_topology_mask(uint8_t link_role);

void acl_ble_connection_complete(const tBLE_BD_ADDR& address_with_type,
                                 uint16_t handle, uint8_t role, bool match,
@@ -34,6 +35,8 @@ void acl_ble_connection_complete(const tBLE_BD_ADDR& address_with_type,
  btm_ble_connected(address_with_type.bda, handle, HCI_ENCRYPT_MODE_DISABLED,
                    role, address_with_type.type, match);

  btm_ble_increment_link_topology_mask(role);

  l2cble_conn_comp(handle, role, address_with_type.bda, address_with_type.type,
                   conn_interval, conn_latency, conn_timeout);

@@ -52,6 +55,8 @@ void acl_ble_enhanced_connection_complete(
  btm_ble_connected(address_with_type.bda, handle, HCI_ENCRYPT_MODE_DISABLED,
                    role, address_with_type.type, match);

  btm_ble_increment_link_topology_mask(role);

  l2cble_conn_comp(handle, role, address_with_type.bda, address_with_type.type,
                   conn_interval, conn_latency, conn_timeout);

+0 −3
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@

using base::StringPrintf;

void btm_ble_increment_link_topology_mask(uint8_t link_role);
tL2CAP_LE_RESULT_CODE btm_ble_start_sec_check(const RawAddress& bd_addr,
                                              uint16_t psm, bool is_originator,
                                              tBTM_SEC_CALLBACK* p_callback,
@@ -267,8 +266,6 @@ void l2cble_notify_le_connection(const RawAddress& bda) {
void l2cble_conn_comp(uint16_t handle, uint8_t role, const RawAddress& bda,
                      tBLE_ADDR_TYPE type, uint16_t conn_interval,
                      uint16_t conn_latency, uint16_t conn_timeout) {
  btm_ble_increment_link_topology_mask(role);

  // role == HCI_ROLE_MASTER => scanner completed connection
  // role == HCI_ROLE_SLAVE => advertiser completed connection