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

Commit b903ce5f authored by Zach Johnson's avatar Zach Johnson
Browse files

Begin migrating L2capTest to use PyAclManager

First step towards migrating the cert l2cap module to its own class.

Yes there are hacks - they will go away in a future change.

Test: cert/run --host --test_filter=L2capTest
Change-Id: If30d8ca405927eb43c1e520868b0a2862bf8d75b
parent be4671b2
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -38,12 +38,15 @@ class PyAclManagerAclConnection(IEventStream, Closable):
        self.our_acl_stream = FilteringEventStream(acl_stream, None)

        if remote_addr:
            remote_addr_bytes = bytes(
                remote_addr,
                'utf8') if type(remote_addr) is str else bytes(remote_addr)
            self.connection_event_stream = EventStream(
                self.device.hci_acl_manager.CreateConnection(
                    acl_manager_facade.ConnectionMsg(
                        address_type=int(
                            hci_packets.AddressType.PUBLIC_DEVICE_ADDRESS),
                        address=bytes(remote_addr, 'utf8'))))
                        address=remote_addr_bytes)))
        else:
            self.connection_event_stream = None

@@ -76,6 +79,10 @@ class PyAclManager(Closable):
        safeClose(self.acl_stream)
        safeClose(self.incoming_connection_stream)

    # temporary, until everyone is migrated
    def get_acl_stream(self):
        return self.acl_stream

    def listen_for_incoming_connections(self):
        self.incoming_connection_stream = EventStream(
            self.device.hci_acl_manager.FetchIncomingConnection(
+1038 −1168

File changed.

Preview size limit exceeded, changes collapsed.