Loading system/gd/hci/acl_manager.cc +10 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,16 @@ void AclManager::CancelLeConnect(AddressWithType address_with_type) { GetHandler()->Post(BindOnce(&le_impl::cancel_connect, common::Unretained(pimpl_->le_impl_), address_with_type)); } void AclManager::AddDeviceToConnectList(AddressWithType address_with_type) { GetHandler()->Post( BindOnce(&le_impl::add_device_to_connect_list, common::Unretained(pimpl_->le_impl_), address_with_type)); } void AclManager::RemoveDeviceFromConnectList(AddressWithType address_with_type) { GetHandler()->Post( BindOnce(&le_impl::remove_device_from_connect_list, common::Unretained(pimpl_->le_impl_), address_with_type)); } void AclManager::MasterLinkKey(KeyFlag key_flag) { GetHandler()->Post(BindOnce(&classic_impl::master_link_key, common::Unretained(pimpl_->classic_impl_), key_flag)); } Loading system/gd/hci/acl_manager.h +2 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,8 @@ class AclManager : public Module { virtual void CancelConnect(Address address); virtual void CancelLeConnect(AddressWithType address_with_type); virtual void AddDeviceToConnectList(AddressWithType address_with_type); virtual void RemoveDeviceFromConnectList(AddressWithType address_with_type); virtual void MasterLinkKey(KeyFlag key_flag); virtual void SwitchRole(Address address, Role role); Loading system/gd/security/cert/security_test.py +8 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ from cert.py_security import PySecurity from facade import common_pb2 as common from google.protobuf import empty_pb2 as empty_proto from hci.facade import controller_facade_pb2 as controller_facade from hci.facade import le_initiator_address_facade_pb2 as le_initiator_address_facade from l2cap.classic.facade_pb2 import ClassicSecurityPolicy from neighbor.facade import facade_pb2 as neighbor_facade from security.cert.cert_security import CertSecurity Loading Loading @@ -59,6 +60,13 @@ class SecurityTest(GdBaseTestClass): self.dut_security = PySecurity(self.dut) self.cert_security = CertSecurity(self.cert) self.dut_address = common.BluetoothAddressWithType( address=common.BluetoothAddress(address=bytes(b'DD:05:04:03:02:01')), type=common.RANDOM_DEVICE_ADDRESS) privacy_policy = le_initiator_address_facade.PrivacyPolicy( address_policy=le_initiator_address_facade.AddressPolicy.USE_STATIC_ADDRESS, address_with_type=self.dut_address) self.dut.security.SetLeInitiatorAddressPolicy(privacy_policy) def teardown_test(self): self.dut_security.close() self.cert_security.close() Loading system/gd/security/internal/security_manager_impl.cc +1 −0 Original line number Diff line number Diff line Loading @@ -171,6 +171,7 @@ void SecurityManagerImpl::NotifyDeviceUnbonded(hci::AddressWithType device) { iter.second->Post( common::Bind(&ISecurityManagerListener::OnDeviceUnbonded, common::Unretained(iter.first), device)); } acl_manager_->RemoveDeviceFromConnectList(device); } void SecurityManagerImpl::NotifyEncryptionStateChanged(hci::EncryptionChangeView encryption_change_view) { Loading Loading
system/gd/hci/acl_manager.cc +10 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,16 @@ void AclManager::CancelLeConnect(AddressWithType address_with_type) { GetHandler()->Post(BindOnce(&le_impl::cancel_connect, common::Unretained(pimpl_->le_impl_), address_with_type)); } void AclManager::AddDeviceToConnectList(AddressWithType address_with_type) { GetHandler()->Post( BindOnce(&le_impl::add_device_to_connect_list, common::Unretained(pimpl_->le_impl_), address_with_type)); } void AclManager::RemoveDeviceFromConnectList(AddressWithType address_with_type) { GetHandler()->Post( BindOnce(&le_impl::remove_device_from_connect_list, common::Unretained(pimpl_->le_impl_), address_with_type)); } void AclManager::MasterLinkKey(KeyFlag key_flag) { GetHandler()->Post(BindOnce(&classic_impl::master_link_key, common::Unretained(pimpl_->classic_impl_), key_flag)); } Loading
system/gd/hci/acl_manager.h +2 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,8 @@ class AclManager : public Module { virtual void CancelConnect(Address address); virtual void CancelLeConnect(AddressWithType address_with_type); virtual void AddDeviceToConnectList(AddressWithType address_with_type); virtual void RemoveDeviceFromConnectList(AddressWithType address_with_type); virtual void MasterLinkKey(KeyFlag key_flag); virtual void SwitchRole(Address address, Role role); Loading
system/gd/security/cert/security_test.py +8 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ from cert.py_security import PySecurity from facade import common_pb2 as common from google.protobuf import empty_pb2 as empty_proto from hci.facade import controller_facade_pb2 as controller_facade from hci.facade import le_initiator_address_facade_pb2 as le_initiator_address_facade from l2cap.classic.facade_pb2 import ClassicSecurityPolicy from neighbor.facade import facade_pb2 as neighbor_facade from security.cert.cert_security import CertSecurity Loading Loading @@ -59,6 +60,13 @@ class SecurityTest(GdBaseTestClass): self.dut_security = PySecurity(self.dut) self.cert_security = CertSecurity(self.cert) self.dut_address = common.BluetoothAddressWithType( address=common.BluetoothAddress(address=bytes(b'DD:05:04:03:02:01')), type=common.RANDOM_DEVICE_ADDRESS) privacy_policy = le_initiator_address_facade.PrivacyPolicy( address_policy=le_initiator_address_facade.AddressPolicy.USE_STATIC_ADDRESS, address_with_type=self.dut_address) self.dut.security.SetLeInitiatorAddressPolicy(privacy_policy) def teardown_test(self): self.dut_security.close() self.cert_security.close() Loading
system/gd/security/internal/security_manager_impl.cc +1 −0 Original line number Diff line number Diff line Loading @@ -171,6 +171,7 @@ void SecurityManagerImpl::NotifyDeviceUnbonded(hci::AddressWithType device) { iter.second->Post( common::Bind(&ISecurityManagerListener::OnDeviceUnbonded, common::Unretained(iter.first), device)); } acl_manager_->RemoveDeviceFromConnectList(device); } void SecurityManagerImpl::NotifyEncryptionStateChanged(hci::EncryptionChangeView encryption_change_view) { Loading