From: Chienyuan Date: Mon, 16 Nov 2020 08:47:58 +0000 (+0800) Subject: shim: check subevent for advertising module X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=028c202bacd97e53a49028496e008bf9f60d4315;p=android-x86%2Fsystem-bt.git shim: check subevent for advertising module Tag: #refactor Bug: 169125803 Test: cert/run --host Test: atest --host bluetooth_test_gd Change-Id: I17ea246feadfebc83757e55bb6238db458bf52d4 --- diff --git a/main/shim/hci_layer.cc b/main/shim/hci_layer.cc index 4cbb1df45..ee341f816 100644 --- a/main/shim/hci_layer.cc +++ b/main/shim/hci_layer.cc @@ -264,18 +264,20 @@ static bool subevent_already_registered_in_le_hci_layer( case bluetooth::hci::SubeventCode::REMOTE_CONNECTION_PARAMETER_REQUEST: return bluetooth::shim::is_gd_acl_enabled() || bluetooth::shim::is_gd_advertising_enabled(); - - 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: + case bluetooth::hci::SubeventCode::ADVERTISING_SET_TERMINATED: + case bluetooth::hci::SubeventCode::SCAN_REQUEST_RECEIVED: + return bluetooth::shim::is_gd_advertising_enabled(); + case bluetooth::hci::SubeventCode::SCAN_TIMEOUT: + case bluetooth::hci::SubeventCode::ADVERTISING_REPORT: case bluetooth::hci::SubeventCode::DIRECTED_ADVERTISING_REPORT: case bluetooth::hci::SubeventCode::EXTENDED_ADVERTISING_REPORT: - case bluetooth::hci::SubeventCode::PERIODIC_ADVERTISING_SYNC_ESTABLISHED: case bluetooth::hci::SubeventCode::PERIODIC_ADVERTISING_REPORT: + case bluetooth::hci::SubeventCode::PERIODIC_ADVERTISING_SYNC_ESTABLISHED: case bluetooth::hci::SubeventCode::PERIODIC_ADVERTISING_SYNC_LOST: - case bluetooth::hci::SubeventCode::SCAN_TIMEOUT: - case bluetooth::hci::SubeventCode::ADVERTISING_SET_TERMINATED: - case bluetooth::hci::SubeventCode::SCAN_REQUEST_RECEIVED: + // TODO return bluetooth::shim::is_gd_scanning_enabled(); + 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: case bluetooth::hci::SubeventCode::CHANNEL_SELECTION_ALGORITHM: case bluetooth::hci::SubeventCode::CONNECTIONLESS_IQ_REPORT: case bluetooth::hci::SubeventCode::CONNECTION_IQ_REPORT: @@ -292,9 +294,7 @@ static bool subevent_already_registered_in_le_hci_layer( case bluetooth::hci::SubeventCode::PATH_LOSS_THRESHOLD: case bluetooth::hci::SubeventCode::TRANSMIT_POWER_REPORTING: case bluetooth::hci::SubeventCode::BIG_INFO_ADVERTISING_REPORT: - case bluetooth::hci::SubeventCode::ADVERTISING_REPORT: case bluetooth::hci::SubeventCode::LONG_TERM_KEY_REQUEST: - return bluetooth::shim::is_gd_advertising_enabled(); default: return false; }