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

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

Add API stack/acl/btm_acl::acl_is_switch_role_idle

Working towards encapsulation of tACL_CONN

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5be3c89527f1e834f8905380105c69e5bba4b6f2
parent 63815813
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2661,3 +2661,12 @@ bool sco_peer_supports_esco_3m_phy(uint16_t hci_handle) {
  }
  return HCI_EDR_ESCO_3MPS_SUPPORTED(p_acl->peer_lmp_feature_pages[0]);
}

bool acl_is_switch_role_idle(const RawAddress& bd_addr,
                             tBT_TRANSPORT transport) {
  tACL_CONN* p_acl = btm_bda_to_acl(bd_addr, transport);
  if (p_acl == nullptr) {
    return false;
  }
  return p_acl->switch_role_state == BTM_ACL_SWKEY_STATE_IDLE;
}
+2 −0
Original line number Diff line number Diff line
@@ -245,6 +245,8 @@ bool acl_peer_supports_ble_connection_parameters_request(

bool sco_peer_supports_esco_2m_phy(uint16_t hci_handle);
bool sco_peer_supports_esco_3m_phy(uint16_t hci_handle);
bool acl_is_switch_role_idle(const RawAddress& bd_addr,
                             tBT_TRANSPORT transport);

/*******************************************************************************
 *