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

Commit fe969c76 authored by Martin Brabham's avatar Martin Brabham
Browse files

Floss: Set the event filter to inquiry result device all Topshim API

Bug: 218496714
Test: mma -j $(nproc)
Test: ./build.py
Tag: #floss
Change-Id: I88cc0b2fd247b0a1c658941964930ffe5bd9c7ba
parent 46951d34
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@ service AdapterService {
  rpc ClearFilterAcceptList(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  rpc ClearFilterAcceptList(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  rpc DisconnectAllAcls(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 LeRand(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  rpc SetEventFilterInquiryResultAllDevices(google.protobuf.Empty) returns (google.protobuf.Empty) {}
}
}


enum EventType {
enum EventType {
+3 −0
Original line number Original line Diff line number Diff line
@@ -80,6 +80,9 @@ class AdapterAutomationHelper():
    async def le_rand(self):
    async def le_rand(self):
        await self.adapter_stub.LeRand(empty_proto.Empty())
        await self.adapter_stub.LeRand(empty_proto.Empty())


    async def set_event_filter_inquiry_result_all_devices(self):
        await self.adapter_stub.SetEventFilterInquiryResultAllDevices(empty_proto.Empty())



class A2dpAutomationHelper():
class A2dpAutomationHelper():
    """Invoke gRPC on topshim for A2DP testing"""
    """Invoke gRPC on topshim for A2DP testing"""
+12 −0
Original line number Original line Diff line number Diff line
@@ -165,4 +165,16 @@ impl AdapterService for AdapterServiceImpl {
            sink.success(Empty::default()).await.unwrap();
            sink.success(Empty::default()).await.unwrap();
        })
        })
    }
    }

    fn set_event_filter_inquiry_result_all_devices(
        &mut self,
        ctx: RpcContext<'_>,
        _req: Empty,
        sink: UnarySink<Empty>,
    ) {
        self.btif_intf.lock().unwrap().set_event_filter_inquiry_result_all_devices();
        ctx.spawn(async move {
            sink.success(Empty::default()).await.unwrap();
        })
    }
}
}
+4 −0
Original line number Original line Diff line number Diff line
@@ -1036,6 +1036,10 @@ impl BluetoothInterface {
        ccall!(self, le_rand)
        ccall!(self, le_rand)
    }
    }


    pub fn set_event_filter_inquiry_result_all_devices(&self) -> i32 {
        ccall!(self, set_event_filter_inquiry_result_all_devices)
    }

    pub(crate) fn get_profile_interface(
    pub(crate) fn get_profile_interface(
        &self,
        &self,
        profile: SupportedProfiles,
        profile: SupportedProfiles,