summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/gd/hci/acl_manager.h2
-rw-r--r--system/gd/l2cap/le/l2cap_le_module.h5
-rw-r--r--system/main/shim/l2c_api.cc24
-rw-r--r--system/main/shim/l2c_api.h3
-rw-r--r--system/test/mock/mock_main_shim_l2cap_api.cc5
-rw-r--r--system/test/mock/mock_main_shim_l2cap_api.h8
6 files changed, 0 insertions, 47 deletions
diff --git a/system/gd/hci/acl_manager.h b/system/gd/hci/acl_manager.h
index 8675b4a05b..08665324c2 100644
--- a/system/gd/hci/acl_manager.h
+++ b/system/gd/hci/acl_manager.h
@@ -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;
diff --git a/system/gd/l2cap/le/l2cap_le_module.h b/system/gd/l2cap/le/l2cap_le_module.h
index 28352c0c68..999f1dfad1 100644
--- a/system/gd/l2cap/le/l2cap_le_module.h
+++ b/system/gd/l2cap/le/l2cap_le_module.h
@@ -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
diff --git a/system/main/shim/l2c_api.cc b/system/main/shim/l2c_api.cc
index 0b12919db3..8dda84e007 100644
--- a/system/main/shim/l2c_api.cc
+++ b/system/main/shim/l2c_api.cc
@@ -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
*/
diff --git a/system/main/shim/l2c_api.h b/system/main/shim/l2c_api.h
index 4b02c44a8c..9f12916ca0 100644
--- a/system/main/shim/l2c_api.h
+++ b/system/main/shim/l2c_api.h
@@ -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,
diff --git a/system/test/mock/mock_main_shim_l2cap_api.cc b/system/test/mock/mock_main_shim_l2cap_api.cc
index f08ce34a2e..e0cfe37ee6 100644
--- a/system/test/mock/mock_main_shim_l2cap_api.cc
+++ b/system/test/mock/mock_main_shim_l2cap_api.cc
@@ -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,
diff --git a/system/test/mock/mock_main_shim_l2cap_api.h b/system/test/mock/mock_main_shim_l2cap_api.h
index 7da77c2258..3905742bb9 100644
--- a/system/test/mock/mock_main_shim_l2cap_api.h
+++ b/system/test/mock/mock_main_shim_l2cap_api.h
@@ -60,14 +60,6 @@ struct L2CA_ReadRemoteFeatures {
uint8_t* operator()(const RawAddress& addr) { return body(addr); };
};
extern struct L2CA_ReadRemoteFeatures L2CA_ReadRemoteFeatures;
-// Name: L2CA_UseLegacySecurityModule
-// Params:
-// Returns: void
-struct L2CA_UseLegacySecurityModule {
- std::function<void()> body{[]() {}};
- void operator()() { body(); };
-};
-extern struct L2CA_UseLegacySecurityModule L2CA_UseLegacySecurityModule;
// Name: L2CA_Register
// Params: uint16_t client_psm, const tL2CAP_APPL_INFO& callbacks, bool
// enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, uint16_t