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

Commit 83f0f496 authored by Chris Manton's avatar Chris Manton
Browse files

Stat-ify stack::acl::IsEprAvailable

Bug: 224999611
Test: net_test_stack_btm

Change-Id: Ifa9418c436526716bfff85d0f1aba6a0002fe97f
parent 85f0ffb7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ constexpr uint16_t BTM_ACL_EXCEPTION_PKTS_MASK =
     HCI_PKT_TYPES_MASK_NO_2_DH3 | HCI_PKT_TYPES_MASK_NO_3_DH3 |
     HCI_PKT_TYPES_MASK_NO_2_DH5 | HCI_PKT_TYPES_MASK_NO_3_DH5);

inline bool IsEprAvailable(const tACL_CONN& p_acl) {
static bool IsEprAvailable(const tACL_CONN& p_acl) {
  if (!p_acl.peer_lmp_feature_valid[0]) {
    LOG_WARN("Checking incomplete feature page read");
    return false;
+0 −5
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ struct acl_set_peer_le_features_from_handle
struct sco_peer_supports_esco_2m_phy sco_peer_supports_esco_2m_phy;
struct sco_peer_supports_esco_3m_phy sco_peer_supports_esco_3m_phy;
struct acl_create_classic_connection acl_create_classic_connection;
struct IsEprAvailable IsEprAvailable;
struct acl_get_connection_from_address acl_get_connection_from_address;
struct btm_acl_for_bda btm_acl_for_bda;
struct acl_get_connection_from_handle acl_get_connection_from_handle;
@@ -320,10 +319,6 @@ void acl_create_classic_connection(const RawAddress& bd_addr,
  return test::mock::stack_acl::acl_create_classic_connection(
      bd_addr, there_are_high_priority_channels, is_bonding);
}
bool IsEprAvailable(const tACL_CONN& p_acl) {
  inc_func_call_count(__func__);
  return test::mock::stack_acl::IsEprAvailable(p_acl);
}
tACL_CONN* acl_get_connection_from_address(const RawAddress& bd_addr,
                                           tBT_TRANSPORT transport) {
  inc_func_call_count(__func__);
+0 −9
Original line number Diff line number Diff line
@@ -359,15 +359,6 @@ struct acl_create_classic_connection {
  };
};
extern struct acl_create_classic_connection acl_create_classic_connection;
// Name: IsEprAvailable
// Params: const tACL_CONN& p_acl
// Returns: inline bool
struct IsEprAvailable {
  std::function<bool(const tACL_CONN& p_acl)> body{
      [](const tACL_CONN& p_acl) { return 0; }};
  inline bool operator()(const tACL_CONN& p_acl) { return body(p_acl); };
};
extern struct IsEprAvailable IsEprAvailable;
// Name: acl_get_connection_from_address
// Params: const RawAddress& bd_addr, tBT_TRANSPORT transport
// Returns: tACL_CONN*