Loading system/bta/csis/csis_client.cc +1 −4 Original line number Diff line number Diff line Loading @@ -1128,10 +1128,7 @@ class CsisClientImpl : public CsisClient { void CsisActiveObserverSet(bool enable) { LOG(INFO) << __func__ << " CSIS Discovery SET: " << enable; if (bluetooth::shim::is_gd_scanning_enabled()) { bluetooth::shim::set_empty_filter(enable); } BTA_DmBleCsisObserve( enable, [](tBTA_DM_SEARCH_EVT event, tBTA_DM_SEARCH* p_data) { /* If there's no instance we are most likely shutting Loading system/btif/src/btif_ble_advertiser.cc +2 −10 Original line number Diff line number Diff line Loading @@ -260,17 +260,9 @@ class BleAdvertiserInterfaceImpl : public BleAdvertiserInterface { } }; BleAdvertiserInterface* btLeAdvertiserInstance = nullptr; } // namespace BleAdvertiserInterface* get_ble_advertiser_instance() { if (bluetooth::shim::is_gd_advertising_enabled()) { LOG(INFO) << __func__ << " use gd le advertiser"; return bluetooth::shim::get_ble_advertiser_instance(); } else if (btLeAdvertiserInstance == nullptr) { btLeAdvertiserInstance = new BleAdvertiserInterfaceImpl(); } return btLeAdvertiserInstance; } system/btif/src/btif_ble_scanner.cc +2 −9 Original line number Diff line number Diff line Loading @@ -343,16 +343,9 @@ class BleScannerInterfaceImpl : public BleScannerInterface { } }; BleScannerInterface* btLeScannerInstance = nullptr; } // namespace BleScannerInterface* get_ble_scanner_instance() { if (bluetooth::shim::is_gd_scanning_enabled()) { LOG_INFO("Use gd le scanner"); return bluetooth::shim::get_ble_scanner_instance(); } else if (btLeScannerInstance == nullptr) { btLeScannerInstance = new BleScannerInterfaceImpl(); } return btLeScannerInstance; } system/main/shim/hci_layer.cc +3 −8 Original line number Diff line number Diff line Loading @@ -207,7 +207,6 @@ static bool subevent_already_registered_in_le_hci_layer( case bluetooth::hci::SubeventCode::REMOTE_CONNECTION_PARAMETER_REQUEST: case bluetooth::hci::SubeventCode::ADVERTISING_SET_TERMINATED: case bluetooth::hci::SubeventCode::SCAN_REQUEST_RECEIVED: return true; case bluetooth::hci::SubeventCode::SCAN_TIMEOUT: case bluetooth::hci::SubeventCode::ADVERTISING_REPORT: case bluetooth::hci::SubeventCode::DIRECTED_ADVERTISING_REPORT: Loading @@ -215,7 +214,7 @@ static bool subevent_already_registered_in_le_hci_layer( case bluetooth::hci::SubeventCode::PERIODIC_ADVERTISING_REPORT: case bluetooth::hci::SubeventCode::PERIODIC_ADVERTISING_SYNC_ESTABLISHED: case bluetooth::hci::SubeventCode::PERIODIC_ADVERTISING_SYNC_LOST: return bluetooth::shim::is_gd_scanning_enabled(); return true; case bluetooth::hci::SubeventCode::READ_REMOTE_FEATURES_COMPLETE: case bluetooth::hci::SubeventCode::READ_LOCAL_P256_PUBLIC_KEY_COMPLETE: case bluetooth::hci::SubeventCode::GENERATE_DHKEY_COMPLETE: Loading Loading @@ -245,7 +244,7 @@ static bool event_already_registered_in_le_advertising_manager( bluetooth::hci::EventCode event_code) { for (auto event : bluetooth::hci::AclConnectionEvents) { if (event == event_code) { return bluetooth::shim::is_gd_advertising_enabled(); return true; } } return false; Loading @@ -255,7 +254,7 @@ static bool event_already_registered_in_le_scanning_manager( bluetooth::hci::EventCode event_code) { for (auto event : bluetooth::hci::AclConnectionEvents) { if (event == event_code) { return bluetooth::shim::is_gd_scanning_enabled(); return true; } } return false; Loading Loading @@ -531,10 +530,6 @@ static void on_shutting_down() { pending_iso_data = nullptr; } if (hci_queue_end != nullptr) { if (!bluetooth::shim::is_gd_advertising_enabled() && !bluetooth::shim::is_gd_l2cap_enabled()) { hci_queue_end->UnregisterDequeue(); } for (uint16_t event_code_raw = 0; event_code_raw < 0x100; event_code_raw++) { auto event_code = static_cast<bluetooth::hci::EventCode>(event_code_raw); Loading system/main/shim/stack.cc +5 −12 Original line number Diff line number Diff line Loading @@ -153,12 +153,8 @@ void Stack::StartEverything() { if (common::init_flags::gd_security_is_enabled()) { modules.add<security::SecurityModule>(); } if (common::init_flags::gd_advertising_is_enabled()) { modules.add<hci::LeAdvertisingManager>(); } if (common::init_flags::gd_scanning_is_enabled()) { modules.add<hci::LeScanningManager>(); } if (common::init_flags::btaa_hci_is_enabled()) { modules.add<activity_attribution::ActivityAttribution>(); } Loading Loading @@ -192,12 +188,9 @@ void Stack::StartEverything() { bluetooth::shim::hci_on_reset_complete(); } if (common::init_flags::gd_advertising_is_enabled()) { bluetooth::shim::init_advertising_manager(); } if (common::init_flags::gd_scanning_is_enabled()) { bluetooth::shim::init_scanning_manager(); } if (common::init_flags::gd_l2cap_is_enabled() && !common::init_flags::gd_core_is_enabled()) { L2CA_UseLegacySecurityModule(); Loading Loading
system/bta/csis/csis_client.cc +1 −4 Original line number Diff line number Diff line Loading @@ -1128,10 +1128,7 @@ class CsisClientImpl : public CsisClient { void CsisActiveObserverSet(bool enable) { LOG(INFO) << __func__ << " CSIS Discovery SET: " << enable; if (bluetooth::shim::is_gd_scanning_enabled()) { bluetooth::shim::set_empty_filter(enable); } BTA_DmBleCsisObserve( enable, [](tBTA_DM_SEARCH_EVT event, tBTA_DM_SEARCH* p_data) { /* If there's no instance we are most likely shutting Loading
system/btif/src/btif_ble_advertiser.cc +2 −10 Original line number Diff line number Diff line Loading @@ -260,17 +260,9 @@ class BleAdvertiserInterfaceImpl : public BleAdvertiserInterface { } }; BleAdvertiserInterface* btLeAdvertiserInstance = nullptr; } // namespace BleAdvertiserInterface* get_ble_advertiser_instance() { if (bluetooth::shim::is_gd_advertising_enabled()) { LOG(INFO) << __func__ << " use gd le advertiser"; return bluetooth::shim::get_ble_advertiser_instance(); } else if (btLeAdvertiserInstance == nullptr) { btLeAdvertiserInstance = new BleAdvertiserInterfaceImpl(); } return btLeAdvertiserInstance; }
system/btif/src/btif_ble_scanner.cc +2 −9 Original line number Diff line number Diff line Loading @@ -343,16 +343,9 @@ class BleScannerInterfaceImpl : public BleScannerInterface { } }; BleScannerInterface* btLeScannerInstance = nullptr; } // namespace BleScannerInterface* get_ble_scanner_instance() { if (bluetooth::shim::is_gd_scanning_enabled()) { LOG_INFO("Use gd le scanner"); return bluetooth::shim::get_ble_scanner_instance(); } else if (btLeScannerInstance == nullptr) { btLeScannerInstance = new BleScannerInterfaceImpl(); } return btLeScannerInstance; }
system/main/shim/hci_layer.cc +3 −8 Original line number Diff line number Diff line Loading @@ -207,7 +207,6 @@ static bool subevent_already_registered_in_le_hci_layer( case bluetooth::hci::SubeventCode::REMOTE_CONNECTION_PARAMETER_REQUEST: case bluetooth::hci::SubeventCode::ADVERTISING_SET_TERMINATED: case bluetooth::hci::SubeventCode::SCAN_REQUEST_RECEIVED: return true; case bluetooth::hci::SubeventCode::SCAN_TIMEOUT: case bluetooth::hci::SubeventCode::ADVERTISING_REPORT: case bluetooth::hci::SubeventCode::DIRECTED_ADVERTISING_REPORT: Loading @@ -215,7 +214,7 @@ static bool subevent_already_registered_in_le_hci_layer( case bluetooth::hci::SubeventCode::PERIODIC_ADVERTISING_REPORT: case bluetooth::hci::SubeventCode::PERIODIC_ADVERTISING_SYNC_ESTABLISHED: case bluetooth::hci::SubeventCode::PERIODIC_ADVERTISING_SYNC_LOST: return bluetooth::shim::is_gd_scanning_enabled(); return true; case bluetooth::hci::SubeventCode::READ_REMOTE_FEATURES_COMPLETE: case bluetooth::hci::SubeventCode::READ_LOCAL_P256_PUBLIC_KEY_COMPLETE: case bluetooth::hci::SubeventCode::GENERATE_DHKEY_COMPLETE: Loading Loading @@ -245,7 +244,7 @@ static bool event_already_registered_in_le_advertising_manager( bluetooth::hci::EventCode event_code) { for (auto event : bluetooth::hci::AclConnectionEvents) { if (event == event_code) { return bluetooth::shim::is_gd_advertising_enabled(); return true; } } return false; Loading @@ -255,7 +254,7 @@ static bool event_already_registered_in_le_scanning_manager( bluetooth::hci::EventCode event_code) { for (auto event : bluetooth::hci::AclConnectionEvents) { if (event == event_code) { return bluetooth::shim::is_gd_scanning_enabled(); return true; } } return false; Loading Loading @@ -531,10 +530,6 @@ static void on_shutting_down() { pending_iso_data = nullptr; } if (hci_queue_end != nullptr) { if (!bluetooth::shim::is_gd_advertising_enabled() && !bluetooth::shim::is_gd_l2cap_enabled()) { hci_queue_end->UnregisterDequeue(); } for (uint16_t event_code_raw = 0; event_code_raw < 0x100; event_code_raw++) { auto event_code = static_cast<bluetooth::hci::EventCode>(event_code_raw); Loading
system/main/shim/stack.cc +5 −12 Original line number Diff line number Diff line Loading @@ -153,12 +153,8 @@ void Stack::StartEverything() { if (common::init_flags::gd_security_is_enabled()) { modules.add<security::SecurityModule>(); } if (common::init_flags::gd_advertising_is_enabled()) { modules.add<hci::LeAdvertisingManager>(); } if (common::init_flags::gd_scanning_is_enabled()) { modules.add<hci::LeScanningManager>(); } if (common::init_flags::btaa_hci_is_enabled()) { modules.add<activity_attribution::ActivityAttribution>(); } Loading Loading @@ -192,12 +188,9 @@ void Stack::StartEverything() { bluetooth::shim::hci_on_reset_complete(); } if (common::init_flags::gd_advertising_is_enabled()) { bluetooth::shim::init_advertising_manager(); } if (common::init_flags::gd_scanning_is_enabled()) { bluetooth::shim::init_scanning_manager(); } if (common::init_flags::gd_l2cap_is_enabled() && !common::init_flags::gd_core_is_enabled()) { L2CA_UseLegacySecurityModule(); Loading