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

Commit 701b96cd authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge "Add back BQR_EVENT registration to VendorSpecificEventManager" into main

parents 0088bc86 70152ebb
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -313,6 +313,16 @@ static void subevent_callback(
                                                     &le_meta_event_view));
}

static void vendor_specific_event_callback(
    bluetooth::hci::VendorSpecificEventView vendor_specific_event_view) {
  if (!send_data_upwards) {
    return;
  }
  send_data_upwards.Run(
      FROM_HERE,
      WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, &vendor_specific_event_view));
}

void OnTransmitPacketCommandComplete(command_complete_cb complete_callback,
                                     void* context,
                                     bluetooth::hci::CommandCompleteView view) {
@@ -540,6 +550,12 @@ void bluetooth::shim::hci_on_reset_complete() {
    cpp::register_le_event(subevent_code);
  }

  // TODO handle BQR event in GD
  auto handler = bluetooth::shim::GetGdShimHandler();
  bluetooth::shim::GetVendorSpecificEventManager()->RegisterEventHandler(
      bluetooth::hci::VseSubeventCode::BQR_EVENT,
      handler->Bind(cpp::vendor_specific_event_callback));

  cpp::register_for_iso();
}