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

Commit efae5e35 authored by Jack He's avatar Jack He
Browse files

GD Controller: Do not register events that are already registered in HCI

Bug: 186069471
Test: make, enable BT, pair headset, listen to music, make calls
Tag: #gd-refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Ie9d9fb20f0b442ed5c84edd5ef03e46be2370504
parent 564c787a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -165,9 +165,12 @@ static bool event_already_registered_in_hci_layer(
    case bluetooth::hci::EventCode::COMMAND_STATUS:
    case bluetooth::hci::EventCode::PAGE_SCAN_REPETITION_MODE_CHANGE:
    case bluetooth::hci::EventCode::MAX_SLOTS_CHANGE:
    case bluetooth::hci::EventCode::LE_META_EVENT:
      return bluetooth::shim::is_gd_hci_enabled() ||
             bluetooth::shim::is_gd_acl_enabled() ||
             bluetooth::shim::is_gd_l2cap_enabled();
    case bluetooth::hci::EventCode::DISCONNECTION_COMPLETE:
    case bluetooth::hci::EventCode::READ_REMOTE_VERSION_INFORMATION_COMPLETE:
    case bluetooth::hci::EventCode::LE_META_EVENT:
      return bluetooth::shim::is_gd_acl_enabled() ||
             bluetooth::shim::is_gd_l2cap_enabled();
    default: