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

Commit a7d9f3d1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "floss: Event filter should not auto accept connections"

parents 16ec3fd8 af44fdd4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1078,7 +1078,7 @@ void Controller::AllowWakeByHid() {
  // Allow Classic HID
  // Allow Classic HID
  auto class_of_device = ClassOfDevice::FromUint32Legacy(COD_HID_MAJOR).value();
  auto class_of_device = ClassOfDevice::FromUint32Legacy(COD_HID_MAJOR).value();
  auto class_of_device_mask = ClassOfDevice::FromUint32Legacy(COD_HID_MASK).value();
  auto class_of_device_mask = ClassOfDevice::FromUint32Legacy(COD_HID_MASK).value();
  auto auto_accept_flag = AutoAcceptFlag::AUTO_ACCEPT_ON_ROLE_SWITCH_ENABLED;
  auto auto_accept_flag = AutoAcceptFlag::AUTO_ACCEPT_OFF;
  std::unique_ptr<SetEventFilterConnectionSetupClassOfDeviceBuilder> packet =
  std::unique_ptr<SetEventFilterConnectionSetupClassOfDeviceBuilder> packet =
      SetEventFilterConnectionSetupClassOfDeviceBuilder::Create(
      SetEventFilterConnectionSetupClassOfDeviceBuilder::Create(
          class_of_device, class_of_device_mask, auto_accept_flag);
          class_of_device, class_of_device_mask, auto_accept_flag);
+2 −2
Original line number Original line Diff line number Diff line
@@ -205,8 +205,8 @@ impl ISuspend for Suspend {


    fn resume(&mut self) -> bool {
    fn resume(&mut self) -> bool {
        self.intf.lock().unwrap().set_default_event_mask_except(0u64, 0u64);
        self.intf.lock().unwrap().set_default_event_mask_except(0u64, 0u64);
        self.intf.lock().unwrap().set_event_filter_inquiry_result_all_devices();
        self.intf.lock().unwrap().clear_event_filter();
        self.intf.lock().unwrap().set_event_filter_connection_setup_all_devices();

        if self.is_connected_suspend {
        if self.is_connected_suspend {
            if self.was_a2dp_connected {
            if self.was_a2dp_connected {
                // TODO(230604670): reconnect to a2dp device
                // TODO(230604670): reconnect to a2dp device