From 7fd46f245ab6a502d0d5f37301d2a0daaaf84ff0 Mon Sep 17 00:00:00 2001 From: Myles Watson <mylesgw@google.com> Date: Wed, 28 Feb 2024 06:09:11 -0800 Subject: [PATCH] bt_target.h: Remove always true BTIF_DM_OOB_TEST Bug: 327390105 Test: mma -j32 Flag: EXEMPT, build-only change Change-Id: I0baa813492a6a5c1db5c7b728b82a2257768fe4e --- system/bta/dm/bta_dm_sec.cc | 4 ---- system/btif/include/btif_dm.h | 2 -- system/btif/src/btif_core.cc | 4 ---- system/btif/src/btif_dm.cc | 2 -- system/internal_include/bt_target.h | 4 ---- 5 files changed, 16 deletions(-) diff --git a/system/bta/dm/bta_dm_sec.cc b/system/bta/dm/bta_dm_sec.cc index 234595f7c24..6554583da2f 100644 --- a/system/bta/dm/bta_dm_sec.cc +++ b/system/bta/dm/bta_dm_sec.cc @@ -557,20 +557,16 @@ static tBTM_STATUS bta_dm_sp_cback(tBTM_SP_EVT event, break; case BTM_SP_LOC_OOB_EVT: -#ifdef BTIF_DM_OOB_TEST btif_dm_proc_loc_oob(BT_TRANSPORT_BR_EDR, (bool)(p_data->loc_oob.status == BTM_SUCCESS), p_data->loc_oob.c, p_data->loc_oob.r); -#endif break; case BTM_SP_RMT_OOB_EVT: { Octet16 c; Octet16 r; sp_rmt_result = false; -#ifdef BTIF_DM_OOB_TEST sp_rmt_result = btif_dm_proc_rmt_oob(p_data->rmt_oob.bd_addr, &c, &r); -#endif log::verbose("result={}", sp_rmt_result); bta_dm_ci_rmt_oob(sp_rmt_result, p_data->rmt_oob.bd_addr, c, r); break; diff --git a/system/btif/include/btif_dm.h b/system/btif/include/btif_dm.h index 71c4c58d855..6df5e1c5d83 100644 --- a/system/btif/include/btif_dm.h +++ b/system/btif/include/btif_dm.h @@ -90,14 +90,12 @@ void btif_dm_set_oob_for_io_req(tBTM_OOB_DATA* p_oob_data); void btif_dm_set_oob_for_le_io_req(const RawAddress& bd_addr, tBTM_OOB_DATA* p_oob_data, tBTM_LE_AUTH_REQ* p_auth_req); -#ifdef BTIF_DM_OOB_TEST void btif_dm_load_local_oob(void); void btif_dm_proc_loc_oob(tBT_TRANSPORT transport, bool is_valid, const Octet16& c, const Octet16& r); bool btif_dm_proc_rmt_oob(const RawAddress& bd_addr, Octet16* p_c, Octet16* p_r); void btif_dm_generate_local_oob_data(tBT_TRANSPORT transport); -#endif /* BTIF_DM_OOB_TEST */ void btif_dm_clear_event_filter(); diff --git a/system/btif/src/btif_core.cc b/system/btif/src/btif_core.cc index 8fcfe455a5d..349722007b2 100644 --- a/system/btif/src/btif_core.cc +++ b/system/btif/src/btif_core.cc @@ -111,9 +111,7 @@ static uid_set_t* uid_set; * Externs ******************************************************************************/ void btif_dm_enable_service(tBTA_SERVICE_ID service_id, bool enable); -#ifdef BTIF_DM_OOB_TEST void btif_dm_load_local_oob(void); -#endif /******************************************************************************* * @@ -219,9 +217,7 @@ void btif_enable_bluetooth_evt() { /* load did configuration */ bte_load_did_conf(BTE_DID_CONF_FILE); -#ifdef BTIF_DM_OOB_TEST btif_dm_load_local_oob(); -#endif future_ready(stack_manager_get_hack_future(), FUTURE_SUCCESS); LOG_INFO("Bluetooth enable event completed"); diff --git a/system/btif/src/btif_dm.cc b/system/btif/src/btif_dm.cc index 58d5b2d8d59..324c77c379a 100644 --- a/system/btif/src/btif_dm.cc +++ b/system/btif/src/btif_dm.cc @@ -3302,7 +3302,6 @@ void btif_dm_set_oob_for_le_io_req(const RawAddress& bd_addr, LOG_VERBOSE("*p_has_oob_data=%d", *p_has_oob_data); } -#ifdef BTIF_DM_OOB_TEST void btif_dm_load_local_oob(void) { char prop_oob[PROPERTY_VALUE_MAX]; osi_property_get("service.brcm.bt.oob", prop_oob, "3"); @@ -3561,7 +3560,6 @@ bool btif_dm_proc_rmt_oob(const RawAddress& bd_addr, Octet16* p_c, bond_state_changed(BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_BONDING); return true; } -#endif /* BTIF_DM_OOB_TEST */ static void btif_dm_ble_key_notif_evt(tBTA_DM_SP_KEY_NOTIF* p_ssp_key_notif) { RawAddress bd_addr; diff --git a/system/internal_include/bt_target.h b/system/internal_include/bt_target.h index 37e3dc835d7..9009dd3e737 100644 --- a/system/internal_include/bt_target.h +++ b/system/internal_include/bt_target.h @@ -87,10 +87,6 @@ #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS #endif -#ifndef BTIF_DM_OOB_TEST -#define BTIF_DM_OOB_TEST TRUE -#endif - // How long to wait before activating sniff mode after entering the // idle state for server FT/RFCOMM, OPS connections #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS -- GitLab