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

Commit 58142d91 authored by Martin Brabham's avatar Martin Brabham
Browse files

Floss: Tell the controller to allow all devices Topshim API

Bug: 232814383
Test: ./build.py
Test: mma -j $(nproc)
Tag: #floss
Change-Id: Iec86c674559d138a8de40c5be4cd33f1c7c05a3c
parent 628bb94e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ service AdapterService {
  rpc ClearFilterAcceptList(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  rpc DisconnectAllAcls(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  rpc LeRand(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  rpc SetEventFilterConnectionSetupAllDevices(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  rpc AllowWakeByHid(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  rpc RestoreFilterAcceptList(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  rpc SetDefaultEventMask(google.protobuf.Empty) returns (google.protobuf.Empty) {}
+1 −0
Original line number Diff line number Diff line
@@ -159,6 +159,7 @@ impl ISuspend for Suspend {
    fn resume(&self) -> bool {
        self.intf.lock().unwrap().set_default_event_mask();
        self.intf.lock().unwrap().set_event_filter_inquiry_result_all_devices();
        self.intf.lock().unwrap().set_event_filter_connection_setup_all_devices();
        if self.is_connected_suspend {
            if self.was_a2dp_connected {
                // TODO(230604670): self.intf.lock().unwrap().restore_filter_accept_list();
+12 −0
Original line number Diff line number Diff line
@@ -203,4 +203,16 @@ impl AdapterService for AdapterServiceImpl {
            sink.success(Empty::default()).await.unwrap();
        })
    }

    fn set_event_filter_connection_setup_all_devices(
        &mut self,
        ctx: RpcContext<'_>,
        _req: Empty,
        sink: UnarySink<Empty>,
    ) {
        self.btif_intf.lock().unwrap().set_event_filter_connection_setup_all_devices();
        ctx.spawn(async move {
            sink.success(Empty::default()).await.unwrap();
        })
    }
}