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

Commit 0dcfd2c8 authored by Qasim Javed's avatar Qasim Javed
Browse files

rusty-gd: Do not invoke VendorSpecificEventManager.

We do not have a VendorSpecificEventManager implementation in Rust.
Avoid crashes when using rusty-gd by only using
VendorSpecificEventManager when rust is not enabled.

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost DirectHciTest

Change-Id: I417211b41fa47b015a33227f62badb7a5dd67ea5
parent 56fa0870
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -864,10 +864,12 @@ void bluetooth::shim::hci_on_reset_complete() {
  }

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

  if (bluetooth::common::init_flags::gd_rust_is_enabled()) {
    ::rust::register_for_iso();