* Only register it when ACL layer is enabled
* Also hci layer event is only registered by HCI lyaer when HCI layer
is enabled
Test: make, pair and connect Bluetooth devices
Bug:
170603745
Tag: #gd-refactor
Change-Id: Icc94d239c28ba58ceffebee1061b4f8042afecc5
void Start(hci::HciLayer* hci) {
hci_ = hci;
Handler* handler = module_.GetHandler();
- hci_->RegisterEventHandler(
- EventCode::NUMBER_OF_COMPLETED_PACKETS, handler->BindOn(this, &Controller::impl::NumberOfCompletedPackets));
+ if (common::InitFlags::GdAclEnabled()) {
+ hci_->RegisterEventHandler(
+ EventCode::NUMBER_OF_COMPLETED_PACKETS, handler->BindOn(this, &Controller::impl::NumberOfCompletedPackets));
+ }
le_set_event_mask(kDefaultLeEventMask);
set_event_mask(kDefaultEventMask);
case bluetooth::hci::EventCode::PAGE_SCAN_REPETITION_MODE_CHANGE:
case bluetooth::hci::EventCode::MAX_SLOTS_CHANGE:
case bluetooth::hci::EventCode::VENDOR_SPECIFIC:
- return true;
+ return bluetooth::shim::is_gd_hci_enabled();
case bluetooth::hci::EventCode::LE_META_EVENT:
case bluetooth::hci::EventCode::DISCONNECTION_COMPLETE:
return bluetooth::shim::is_gd_shim_enabled();
bluetooth::hci::EventCode event_code) {
switch (event_code) {
case bluetooth::hci::EventCode::NUMBER_OF_COMPLETED_PACKETS:
- return bluetooth::shim::is_gd_controller_enabled();
+ return bluetooth::shim::is_gd_acl_enabled();
default:
return false;
}