Loading system/main/shim/acl.cc +0 −8 Original line number Diff line number Diff line Loading @@ -1517,14 +1517,6 @@ void shim::legacy::Acl::CancelClassicConnection(const hci::Address& address) { "classic"); } void shim::legacy::Acl::DeviceAlreadyConnected( const hci::AddressWithType& address_with_type, std::promise<bool> promise) { auto handle = GetAclManager()->HACK_GetLeHandle(address_with_type.GetAddress()); // 0xffff(kIllegalConnectionHandle) is the invalid handle. promise.set_value(handle != 0xffff); } void shim::legacy::Acl::AcceptLeConnectionFrom( const hci::AddressWithType& address_with_type, bool is_direct, std::promise<bool> promise) { Loading system/main/shim/acl.h +0 −2 Original line number Diff line number Diff line Loading @@ -71,8 +71,6 @@ class Acl : public hci::acl_manager::ConnectionCallbacks, // LinkConnectionInterface void CreateClassicConnection(const hci::Address& address) override; void CancelClassicConnection(const hci::Address& address) override; void DeviceAlreadyConnected(const hci::AddressWithType& address_with_type, std::promise<bool> promise); void AcceptLeConnectionFrom(const hci::AddressWithType& address_with_type, bool is_direct, std::promise<bool> promise) override; Loading system/main/shim/acl_api.cc +0 −10 Original line number Diff line number Diff line Loading @@ -56,16 +56,6 @@ void bluetooth::shim::ACL_CancelClassicConnection( Stack::GetInstance()->GetAcl()->CancelClassicConnection(address); } bool bluetooth::shim::ACL_DeviceAlreadyConnected( const tBLE_BD_ADDR& legacy_address_with_type) { std::promise<bool> promise; auto future = promise.get_future(); Stack::GetInstance()->GetAcl()->DeviceAlreadyConnected( ToAddressWithTypeFromLegacy(legacy_address_with_type), std::move(promise)); return future.get(); } bool bluetooth::shim::ACL_AcceptLeConnectionFrom( const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct) { std::promise<bool> promise; Loading system/main/shim/acl_api.h +0 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ namespace shim { void ACL_CreateClassicConnection(const RawAddress& raw_address); void ACL_CancelClassicConnection(const RawAddress& raw_address); bool ACL_DeviceAlreadyConnected(const tBLE_BD_ADDR& legacy_address_with_type); bool ACL_AcceptLeConnectionFrom(const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct); void ACL_IgnoreLeConnectionFrom(const tBLE_BD_ADDR& legacy_address_with_type); Loading system/stack/btm/btm_ble_bgconn.cc +0 −14 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ #include "stack/btm/btm_ble_bgconn.h" #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <cstdint> #include <unordered_map> Loading @@ -39,7 +38,6 @@ #include "stack/btm/btm_ble_int.h" #include "stack/btm/btm_dev.h" #include "stack/btm/btm_int_types.h" #include "stack/include/acl_api.h" #include "types/raw_address.h" using namespace bluetooth; Loading Loading @@ -116,18 +114,6 @@ bool BTM_AcceptlistAdd(const RawAddress& address, bool is_direct) { return false; } if (com::android::bluetooth::flags::verify_handle_before_add_accept_list()) { // Only RPA is checked here. RPA is converted to the identity address in // BTM_Sec_GetAddressWithType if host has resolved it. Adding the identity // address to accept list is not necessary if a valid handle already exists // for the RPA. if (BTM_BLE_IS_RESOLVE_BDA(address) && bluetooth::shim::ACL_DeviceAlreadyConnected( {.type = 0x01, .bda = address})) { log::info("Already connected, not adding to accept list."); return true; } } return bluetooth::shim::ACL_AcceptLeConnectionFrom( BTM_Sec_GetAddressWithType(address), is_direct); } Loading Loading
system/main/shim/acl.cc +0 −8 Original line number Diff line number Diff line Loading @@ -1517,14 +1517,6 @@ void shim::legacy::Acl::CancelClassicConnection(const hci::Address& address) { "classic"); } void shim::legacy::Acl::DeviceAlreadyConnected( const hci::AddressWithType& address_with_type, std::promise<bool> promise) { auto handle = GetAclManager()->HACK_GetLeHandle(address_with_type.GetAddress()); // 0xffff(kIllegalConnectionHandle) is the invalid handle. promise.set_value(handle != 0xffff); } void shim::legacy::Acl::AcceptLeConnectionFrom( const hci::AddressWithType& address_with_type, bool is_direct, std::promise<bool> promise) { Loading
system/main/shim/acl.h +0 −2 Original line number Diff line number Diff line Loading @@ -71,8 +71,6 @@ class Acl : public hci::acl_manager::ConnectionCallbacks, // LinkConnectionInterface void CreateClassicConnection(const hci::Address& address) override; void CancelClassicConnection(const hci::Address& address) override; void DeviceAlreadyConnected(const hci::AddressWithType& address_with_type, std::promise<bool> promise); void AcceptLeConnectionFrom(const hci::AddressWithType& address_with_type, bool is_direct, std::promise<bool> promise) override; Loading
system/main/shim/acl_api.cc +0 −10 Original line number Diff line number Diff line Loading @@ -56,16 +56,6 @@ void bluetooth::shim::ACL_CancelClassicConnection( Stack::GetInstance()->GetAcl()->CancelClassicConnection(address); } bool bluetooth::shim::ACL_DeviceAlreadyConnected( const tBLE_BD_ADDR& legacy_address_with_type) { std::promise<bool> promise; auto future = promise.get_future(); Stack::GetInstance()->GetAcl()->DeviceAlreadyConnected( ToAddressWithTypeFromLegacy(legacy_address_with_type), std::move(promise)); return future.get(); } bool bluetooth::shim::ACL_AcceptLeConnectionFrom( const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct) { std::promise<bool> promise; Loading
system/main/shim/acl_api.h +0 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ namespace shim { void ACL_CreateClassicConnection(const RawAddress& raw_address); void ACL_CancelClassicConnection(const RawAddress& raw_address); bool ACL_DeviceAlreadyConnected(const tBLE_BD_ADDR& legacy_address_with_type); bool ACL_AcceptLeConnectionFrom(const tBLE_BD_ADDR& legacy_address_with_type, bool is_direct); void ACL_IgnoreLeConnectionFrom(const tBLE_BD_ADDR& legacy_address_with_type); Loading
system/stack/btm/btm_ble_bgconn.cc +0 −14 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ #include "stack/btm/btm_ble_bgconn.h" #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <cstdint> #include <unordered_map> Loading @@ -39,7 +38,6 @@ #include "stack/btm/btm_ble_int.h" #include "stack/btm/btm_dev.h" #include "stack/btm/btm_int_types.h" #include "stack/include/acl_api.h" #include "types/raw_address.h" using namespace bluetooth; Loading Loading @@ -116,18 +114,6 @@ bool BTM_AcceptlistAdd(const RawAddress& address, bool is_direct) { return false; } if (com::android::bluetooth::flags::verify_handle_before_add_accept_list()) { // Only RPA is checked here. RPA is converted to the identity address in // BTM_Sec_GetAddressWithType if host has resolved it. Adding the identity // address to accept list is not necessary if a valid handle already exists // for the RPA. if (BTM_BLE_IS_RESOLVE_BDA(address) && bluetooth::shim::ACL_DeviceAlreadyConnected( {.type = 0x01, .bda = address})) { log::info("Already connected, not adding to accept list."); return true; } } return bluetooth::shim::ACL_AcceptLeConnectionFrom( BTM_Sec_GetAddressWithType(address), is_direct); } Loading