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

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

Remove unused main::shim::l2cap::L2CA_UseLegacySecurityModule

Bug: 309799239
Bug: 290845038
Test: m .

Change-Id: I39b2207bebf85820ca641e322e2c96aa9db39421
parent 88e3e57b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ class Acl;
}

class Btm;
void L2CA_UseLegacySecurityModule();
bool L2CA_SetAclPriority(uint16_t, bool);
}

@@ -52,7 +51,6 @@ namespace hci {
class AclManager : public Module {
 friend class bluetooth::shim::Btm;
 friend class bluetooth::shim::legacy::Acl;
 friend void bluetooth::shim::L2CA_UseLegacySecurityModule();
 friend bool bluetooth::shim::L2CA_SetAclPriority(uint16_t, bool);
 friend class bluetooth::hci::LeScanningManager;
 friend class bluetooth::hci::DistanceMeasurementManager;
+0 −5
Original line number Diff line number Diff line
@@ -25,10 +25,6 @@

namespace bluetooth {

namespace shim {
void L2CA_UseLegacySecurityModule();
}

namespace security {
class SecurityModule;
}
@@ -70,7 +66,6 @@ class L2capLeModule : public bluetooth::Module {
  std::unique_ptr<impl> pimpl_;

  friend security::SecurityModule;
  friend void bluetooth::shim::L2CA_UseLegacySecurityModule();

  /**
   * Only for the LE security module to inject functionality to enforce security level for a connection. When LE
+0 −24
Original line number Diff line number Diff line
@@ -690,30 +690,6 @@ uint8_t* L2CA_ReadRemoteFeatures(const RawAddress& addr) {
  return entry.raw_remote_features;
}

static void on_sco_disconnect(uint16_t handle, uint8_t reason) {
  GetGdShimHandler()->Post(base::BindOnce(base::IgnoreResult(&btm_sco_removed),
                                          handle,
                                          static_cast<tHCI_REASON>(reason)));
}

void L2CA_UseLegacySecurityModule() {
  LOG_INFO("GD L2cap is using legacy security module");
  GetL2capClassicModule()->SetLinkPropertyListener(
      GetGdShimHandler(), &link_property_listener_shim_);

  GetL2capClassicModule()->InjectSecurityEnforcementInterface(
      &security_enforcement_shim_);
  security_interface_ = GetL2capClassicModule()->GetSecurityInterface(
      GetGdShimHandler(), &security_listener_shim_);

  GetL2capLeModule()->SetLinkPropertyListener(GetGdShimHandler(),
                                              &le_link_property_listener_shim_);
  GetL2capLeModule()->InjectSecurityEnforcementInterface(
      &le_security_enforcement_shim_);

  GetAclManager()->HACK_SetNonAclDisconnectCallback(on_sco_disconnect);
}

/**
 * Classic Service Registration APIs
 */
+0 −3
Original line number Diff line number Diff line
@@ -455,9 +455,6 @@ void L2CA_ConnectForSecurity(const RawAddress& bd_addr);
// Set bonding state to acquire/release link refcount
void L2CA_SetBondingState(const RawAddress& p_bd_addr, bool is_bonding);

// Indicated by shim stack manager that GD L2cap is enabled but Security is not
void L2CA_UseLegacySecurityModule();

void L2CA_SwitchRoleToCentral(const RawAddress& addr);

bool L2CA_ReadRemoteVersion(const RawAddress& addr, uint8_t* lmp_version,
+0 −5
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ namespace main_shim_l2cap_api {
// Function state capture and return values, if needed
struct L2CA_ReadRemoteVersion L2CA_ReadRemoteVersion;
struct L2CA_ReadRemoteFeatures L2CA_ReadRemoteFeatures;
struct L2CA_UseLegacySecurityModule L2CA_UseLegacySecurityModule;
struct L2CA_Register L2CA_Register;
struct L2CA_Deregister L2CA_Deregister;
struct L2CA_ConnectReq L2CA_ConnectReq;
@@ -101,10 +100,6 @@ uint8_t* bluetooth::shim::L2CA_ReadRemoteFeatures(const RawAddress& addr) {
  inc_func_call_count(__func__);
  return test::mock::main_shim_l2cap_api::L2CA_ReadRemoteFeatures(addr);
}
void bluetooth::shim::L2CA_UseLegacySecurityModule() {
  inc_func_call_count(__func__);
  test::mock::main_shim_l2cap_api::L2CA_UseLegacySecurityModule();
}
uint16_t bluetooth::shim::L2CA_Register(
    uint16_t client_psm, const tL2CAP_APPL_INFO& callbacks, bool enable_snoop,
    tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu,
Loading