Loading system/gd/cert/py_le_acl_manager.py +1 −7 Original line number Diff line number Diff line Loading @@ -43,13 +43,7 @@ class PyLeAclManagerAclConnection(IEventStream, Closable): self.our_acl_stream = acl_stream if remote_addr: remote_addr_bytes = bytes(remote_addr.address.address, 'utf8') if type(remote_addr.address.address) is str else bytes( remote_addr.address.address) self.connection_event_stream = EventStream( self.device.hci_le_acl_manager.CreateConnection( le_acl_manager_facade.LeConnectionMsg( address_type=int(remote_addr.type), address=remote_addr_bytes))) self.connection_event_stream = EventStream(self.device.hci_le_acl_manager.CreateConnection(remote_addr)) else: self.connection_event_stream = None Loading system/gd/hci/acl_manager.cc +4 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,10 @@ void AclManager::CancelConnect(Address address) { GetHandler()->Post(BindOnce(&classic_impl::cancel_connect, common::Unretained(pimpl_->classic_impl_), address)); } void AclManager::CancelLeConnect(AddressWithType address_with_type) { GetHandler()->Post(BindOnce(&le_impl::cancel_connect, 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 @@ -71,6 +71,8 @@ class AclManager : public Module { // successfully cancelled and already connected virtual void CancelConnect(Address address); virtual void CancelLeConnect(AddressWithType address_with_type); virtual void MasterLinkKey(KeyFlag key_flag); virtual void SwitchRole(Address address, Role role); virtual uint16_t ReadDefaultLinkPolicySettings(); Loading system/gd/hci/acl_manager/le_impl.h +6 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,12 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { } } void cancel_connect(AddressWithType /* TODO: use this parameter for whitelist management */) { le_acl_connection_interface_->EnqueueCommand( LeCreateConnectionCancelBuilder::Create(), handler_->BindOnce(&check_command_complete<LeCreateConnectionCancelCompleteView>)); } void set_privacy_policy_for_initiator_address( LeAddressManager::AddressPolicy address_policy, AddressWithType fixed_address, Loading system/gd/hci/cert/le_acl_manager_test.py +6 −6 Original line number Diff line number Diff line Loading @@ -117,9 +117,9 @@ class LeAclManagerTest(GdBaseTestClass): with EventStream( self.dut.hci_le_acl_manager.CreateConnection( le_acl_manager_facade.LeConnectionMsg( address_type=int(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS), address=bytes('0C:05:04:03:02:01', 'utf8')))) as connection_event_stream: common.BluetoothAddressWithType( address=common.BluetoothAddress(address=bytes('0C:05:04:03:02:01', 'utf8')), type=int(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS)))) as connection_event_stream: # Cert gets ConnectionComplete with a handle and sends ACL data handle = 0xfff Loading Loading @@ -338,9 +338,9 @@ class LeAclManagerTest(GdBaseTestClass): with EventStream( self.dut.hci_le_acl_manager.CreateConnection( le_acl_manager_facade.LeConnectionMsg( address_type=int(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS), address=bytes('0C:05:04:03:02:01', 'utf8')))) as connection_event_stream: common.BluetoothAddressWithType( address=common.BluetoothAddress(address=bytes('0C:05:04:03:02:01', 'utf8')), type=int(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS)))) as connection_event_stream: # Cert gets ConnectionComplete with a handle and sends ACL data handle = 0xfff Loading Loading
system/gd/cert/py_le_acl_manager.py +1 −7 Original line number Diff line number Diff line Loading @@ -43,13 +43,7 @@ class PyLeAclManagerAclConnection(IEventStream, Closable): self.our_acl_stream = acl_stream if remote_addr: remote_addr_bytes = bytes(remote_addr.address.address, 'utf8') if type(remote_addr.address.address) is str else bytes( remote_addr.address.address) self.connection_event_stream = EventStream( self.device.hci_le_acl_manager.CreateConnection( le_acl_manager_facade.LeConnectionMsg( address_type=int(remote_addr.type), address=remote_addr_bytes))) self.connection_event_stream = EventStream(self.device.hci_le_acl_manager.CreateConnection(remote_addr)) else: self.connection_event_stream = None Loading
system/gd/hci/acl_manager.cc +4 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,10 @@ void AclManager::CancelConnect(Address address) { GetHandler()->Post(BindOnce(&classic_impl::cancel_connect, common::Unretained(pimpl_->classic_impl_), address)); } void AclManager::CancelLeConnect(AddressWithType address_with_type) { GetHandler()->Post(BindOnce(&le_impl::cancel_connect, 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 @@ -71,6 +71,8 @@ class AclManager : public Module { // successfully cancelled and already connected virtual void CancelConnect(Address address); virtual void CancelLeConnect(AddressWithType address_with_type); virtual void MasterLinkKey(KeyFlag key_flag); virtual void SwitchRole(Address address, Role role); virtual uint16_t ReadDefaultLinkPolicySettings(); Loading
system/gd/hci/acl_manager/le_impl.h +6 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,12 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { } } void cancel_connect(AddressWithType /* TODO: use this parameter for whitelist management */) { le_acl_connection_interface_->EnqueueCommand( LeCreateConnectionCancelBuilder::Create(), handler_->BindOnce(&check_command_complete<LeCreateConnectionCancelCompleteView>)); } void set_privacy_policy_for_initiator_address( LeAddressManager::AddressPolicy address_policy, AddressWithType fixed_address, Loading
system/gd/hci/cert/le_acl_manager_test.py +6 −6 Original line number Diff line number Diff line Loading @@ -117,9 +117,9 @@ class LeAclManagerTest(GdBaseTestClass): with EventStream( self.dut.hci_le_acl_manager.CreateConnection( le_acl_manager_facade.LeConnectionMsg( address_type=int(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS), address=bytes('0C:05:04:03:02:01', 'utf8')))) as connection_event_stream: common.BluetoothAddressWithType( address=common.BluetoothAddress(address=bytes('0C:05:04:03:02:01', 'utf8')), type=int(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS)))) as connection_event_stream: # Cert gets ConnectionComplete with a handle and sends ACL data handle = 0xfff Loading Loading @@ -338,9 +338,9 @@ class LeAclManagerTest(GdBaseTestClass): with EventStream( self.dut.hci_le_acl_manager.CreateConnection( le_acl_manager_facade.LeConnectionMsg( address_type=int(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS), address=bytes('0C:05:04:03:02:01', 'utf8')))) as connection_event_stream: common.BluetoothAddressWithType( address=common.BluetoothAddress(address=bytes('0C:05:04:03:02:01', 'utf8')), type=int(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS)))) as connection_event_stream: # Cert gets ConnectionComplete with a handle and sends ACL data handle = 0xfff Loading