Loading system/blueberry/facade/topshim/facade.proto +6 −1 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,7 @@ service AdapterService { rpc SetEventFilterConnectionSetupAllDevices(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 AllowWakeByHid(google.protobuf.Empty) returns (google.protobuf.Empty) {} rpc RestoreFilterAcceptList(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) {} rpc SetDefaultEventMaskExcept(SetDefaultEventMaskExceptRequest) returns (google.protobuf.Empty) {} rpc SetEventFilterInquiryResultAllDevices(google.protobuf.Empty) returns (google.protobuf.Empty) {} rpc SetEventFilterInquiryResultAllDevices(google.protobuf.Empty) returns (google.protobuf.Empty) {} } } Loading Loading @@ -184,6 +184,11 @@ message SetVolumeRequest { int32 volume = 2; int32 volume = 2; } } message SetDefaultEventMaskExceptRequest { uint64 mask = 1; uint64 le_mask = 2; } // A Token representing an ACL connection. // A Token representing an ACL connection. // It's acquired via a Connect on the Host service (Bluetooth Core stack in our case). // It's acquired via a Connect on the Host service (Bluetooth Core stack in our case). message Connection { message Connection { Loading system/blueberry/tests/topshim/lib/adapter_client.py +3 −2 Original line number Original line Diff line number Diff line Loading @@ -106,8 +106,9 @@ class AdapterClient(AsyncClosable): async def restore_filter_accept_list(self): async def restore_filter_accept_list(self): await self.__adapter_stub.RestoreFilterAcceptList(empty_proto.Empty()) await self.__adapter_stub.RestoreFilterAcceptList(empty_proto.Empty()) async def set_default_event_mask(self): async def set_default_event_mask_except(self, mask, le_mask): await self.__adapter_stub.SetDefaultEventMask(empty_proto.Empty()) await self.__adapter_stub.SetDefaultEventMaskExcept( facade_pb2.SetDefaultEventMaskExceptRequest(mask=mask, le_mask=le_mask)) async def set_event_filter_inquiry_result_all_devices(self): async def set_event_filter_inquiry_result_all_devices(self): await self.__adapter_stub.SetEventFilterInquiryResultAllDevices(empty_proto.Empty()) await self.__adapter_stub.SetEventFilterInquiryResultAllDevices(empty_proto.Empty()) Loading system/blueberry/tests/topshim/lib/topshim_device.py +2 −2 Original line number Original line Diff line number Diff line Loading @@ -135,8 +135,8 @@ class TopshimDevice(AsyncClosable): def allow_wake_by_hid(self): def allow_wake_by_hid(self): self.__post(self.__adapter.allow_wake_by_hid()) self.__post(self.__adapter.allow_wake_by_hid()) def set_default_event_mask(self): def set_default_event_mask_except(self, mask, le_mask): self.__post(self.__adapter.set_default_event_mask()) self.__post(self.__adapter.set_default_event_mask(mask, le_mask)) def set_event_filter_inquiry_result_all_devices(self): def set_event_filter_inquiry_result_all_devices(self): self.__post(self.__adapter.set_event_filter_inquiry_result_all_devices()) self.__post(self.__adapter.set_event_filter_inquiry_result_all_devices()) Loading system/blueberry/tests/topshim/power/suspend_test.py +2 −2 Original line number Original line Diff line number Diff line Loading @@ -35,7 +35,7 @@ class SuspendTest(TopshimBaseTest): def __verify_no_wake_resume(self): def __verify_no_wake_resume(self): # Start resume work # Start resume work self.dut().set_default_event_mask() self.dut().set_default_event_mask_except(0, 0) self.dut().set_event_filter_inquiry_result_all_devices() self.dut().set_event_filter_inquiry_result_all_devices() self.dut().set_event_filter_connection_setup_all_devices() self.dut().set_event_filter_connection_setup_all_devices() self.dut().le_rand() self.dut().le_rand() Loading @@ -55,7 +55,7 @@ class SuspendTest(TopshimBaseTest): def __verify_wakeful_resume(self, was_a2dp_connected): def __verify_wakeful_resume(self, was_a2dp_connected): # Start resume work # Start resume work self.dut().set_default_event_mask() self.dut().set_default_event_mask_except(0, 0) self.dut().set_event_filter_inquiry_result_all_devices() self.dut().set_event_filter_inquiry_result_all_devices() self.dut().set_event_filter_connection_setup_all_devices() self.dut().set_event_filter_connection_setup_all_devices() if was_a2dp_connected: if was_a2dp_connected: Loading system/bta/dm/bta_dm_act.cc +11 −7 Original line number Original line Diff line number Diff line Loading @@ -4183,10 +4183,11 @@ void bta_dm_set_event_filter_connection_setup_all_devices() { * * * Description Allow the device to be woken by HID devices * Description Allow the device to be woken by HID devices * * * Parameters std::vector or RawAddress * Parameters std::vector of (Address, Address Type) * * *******************************************************************************/ *******************************************************************************/ void bta_dm_allow_wake_by_hid(std::vector<RawAddress> le_hid_devices) { void bta_dm_allow_wake_by_hid( std::vector<std::pair<RawAddress, uint8_t>> le_hid_devices) { // Autoplumbed // Autoplumbed bluetooth::shim::BTM_AllowWakeByHid(le_hid_devices); bluetooth::shim::BTM_AllowWakeByHid(le_hid_devices); } } Loading @@ -4207,16 +4208,19 @@ void bta_dm_restore_filter_accept_list() { /******************************************************************************* /******************************************************************************* * * * Function BTA_DmSetDefaultEventMask * Function BTA_DmSetDefaultEventMaskExcept * * * Description Floss: Set the default event mask for Classic and LE * Description Floss: Set the default event mask for Classic and LE except * the given values (they will be disabled in the final set * mask). * * * Parameters * Parameters Bits set for event mask and le event mask that should be * disabled in the final value. * * *******************************************************************************/ *******************************************************************************/ void bta_dm_set_default_event_mask() { void bta_dm_set_default_event_mask_except(uint64_t mask, uint64_t le_mask) { // Autoplumbed // Autoplumbed bluetooth::shim::BTM_SetDefaultEventMask(); bluetooth::shim::BTM_SetDefaultEventMaskExcept(mask, le_mask); } } /******************************************************************************* /******************************************************************************* Loading Loading
system/blueberry/facade/topshim/facade.proto +6 −1 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,7 @@ service AdapterService { rpc SetEventFilterConnectionSetupAllDevices(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 AllowWakeByHid(google.protobuf.Empty) returns (google.protobuf.Empty) {} rpc RestoreFilterAcceptList(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) {} rpc SetDefaultEventMaskExcept(SetDefaultEventMaskExceptRequest) returns (google.protobuf.Empty) {} rpc SetEventFilterInquiryResultAllDevices(google.protobuf.Empty) returns (google.protobuf.Empty) {} rpc SetEventFilterInquiryResultAllDevices(google.protobuf.Empty) returns (google.protobuf.Empty) {} } } Loading Loading @@ -184,6 +184,11 @@ message SetVolumeRequest { int32 volume = 2; int32 volume = 2; } } message SetDefaultEventMaskExceptRequest { uint64 mask = 1; uint64 le_mask = 2; } // A Token representing an ACL connection. // A Token representing an ACL connection. // It's acquired via a Connect on the Host service (Bluetooth Core stack in our case). // It's acquired via a Connect on the Host service (Bluetooth Core stack in our case). message Connection { message Connection { Loading
system/blueberry/tests/topshim/lib/adapter_client.py +3 −2 Original line number Original line Diff line number Diff line Loading @@ -106,8 +106,9 @@ class AdapterClient(AsyncClosable): async def restore_filter_accept_list(self): async def restore_filter_accept_list(self): await self.__adapter_stub.RestoreFilterAcceptList(empty_proto.Empty()) await self.__adapter_stub.RestoreFilterAcceptList(empty_proto.Empty()) async def set_default_event_mask(self): async def set_default_event_mask_except(self, mask, le_mask): await self.__adapter_stub.SetDefaultEventMask(empty_proto.Empty()) await self.__adapter_stub.SetDefaultEventMaskExcept( facade_pb2.SetDefaultEventMaskExceptRequest(mask=mask, le_mask=le_mask)) async def set_event_filter_inquiry_result_all_devices(self): async def set_event_filter_inquiry_result_all_devices(self): await self.__adapter_stub.SetEventFilterInquiryResultAllDevices(empty_proto.Empty()) await self.__adapter_stub.SetEventFilterInquiryResultAllDevices(empty_proto.Empty()) Loading
system/blueberry/tests/topshim/lib/topshim_device.py +2 −2 Original line number Original line Diff line number Diff line Loading @@ -135,8 +135,8 @@ class TopshimDevice(AsyncClosable): def allow_wake_by_hid(self): def allow_wake_by_hid(self): self.__post(self.__adapter.allow_wake_by_hid()) self.__post(self.__adapter.allow_wake_by_hid()) def set_default_event_mask(self): def set_default_event_mask_except(self, mask, le_mask): self.__post(self.__adapter.set_default_event_mask()) self.__post(self.__adapter.set_default_event_mask(mask, le_mask)) def set_event_filter_inquiry_result_all_devices(self): def set_event_filter_inquiry_result_all_devices(self): self.__post(self.__adapter.set_event_filter_inquiry_result_all_devices()) self.__post(self.__adapter.set_event_filter_inquiry_result_all_devices()) Loading
system/blueberry/tests/topshim/power/suspend_test.py +2 −2 Original line number Original line Diff line number Diff line Loading @@ -35,7 +35,7 @@ class SuspendTest(TopshimBaseTest): def __verify_no_wake_resume(self): def __verify_no_wake_resume(self): # Start resume work # Start resume work self.dut().set_default_event_mask() self.dut().set_default_event_mask_except(0, 0) self.dut().set_event_filter_inquiry_result_all_devices() self.dut().set_event_filter_inquiry_result_all_devices() self.dut().set_event_filter_connection_setup_all_devices() self.dut().set_event_filter_connection_setup_all_devices() self.dut().le_rand() self.dut().le_rand() Loading @@ -55,7 +55,7 @@ class SuspendTest(TopshimBaseTest): def __verify_wakeful_resume(self, was_a2dp_connected): def __verify_wakeful_resume(self, was_a2dp_connected): # Start resume work # Start resume work self.dut().set_default_event_mask() self.dut().set_default_event_mask_except(0, 0) self.dut().set_event_filter_inquiry_result_all_devices() self.dut().set_event_filter_inquiry_result_all_devices() self.dut().set_event_filter_connection_setup_all_devices() self.dut().set_event_filter_connection_setup_all_devices() if was_a2dp_connected: if was_a2dp_connected: Loading
system/bta/dm/bta_dm_act.cc +11 −7 Original line number Original line Diff line number Diff line Loading @@ -4183,10 +4183,11 @@ void bta_dm_set_event_filter_connection_setup_all_devices() { * * * Description Allow the device to be woken by HID devices * Description Allow the device to be woken by HID devices * * * Parameters std::vector or RawAddress * Parameters std::vector of (Address, Address Type) * * *******************************************************************************/ *******************************************************************************/ void bta_dm_allow_wake_by_hid(std::vector<RawAddress> le_hid_devices) { void bta_dm_allow_wake_by_hid( std::vector<std::pair<RawAddress, uint8_t>> le_hid_devices) { // Autoplumbed // Autoplumbed bluetooth::shim::BTM_AllowWakeByHid(le_hid_devices); bluetooth::shim::BTM_AllowWakeByHid(le_hid_devices); } } Loading @@ -4207,16 +4208,19 @@ void bta_dm_restore_filter_accept_list() { /******************************************************************************* /******************************************************************************* * * * Function BTA_DmSetDefaultEventMask * Function BTA_DmSetDefaultEventMaskExcept * * * Description Floss: Set the default event mask for Classic and LE * Description Floss: Set the default event mask for Classic and LE except * the given values (they will be disabled in the final set * mask). * * * Parameters * Parameters Bits set for event mask and le event mask that should be * disabled in the final value. * * *******************************************************************************/ *******************************************************************************/ void bta_dm_set_default_event_mask() { void bta_dm_set_default_event_mask_except(uint64_t mask, uint64_t le_mask) { // Autoplumbed // Autoplumbed bluetooth::shim::BTM_SetDefaultEventMask(); bluetooth::shim::BTM_SetDefaultEventMaskExcept(mask, le_mask); } } /******************************************************************************* /******************************************************************************* Loading