Loading system/internal_include/bt_target.h +0 −4 Original line number Diff line number Diff line Loading @@ -1026,8 +1026,4 @@ #include "bt_trace.h" #ifndef BTM_DISABLE_CONCURRENT_PEER_AUTH #define BTM_DISABLE_CONCURRENT_PEER_AUTH FALSE #endif #endif /* BT_TARGET_H */ system/stack/btm/btm_sec.cc +12 −7 Original line number Diff line number Diff line Loading @@ -154,6 +154,14 @@ static void NotifyBondingChange(tBTM_SEC_DEV_REC& p_dev_rec, } } static bool concurrentPeerAuthIsEnabled() { // Was previously named BTM_DISABLE_CONCURRENT_PEER_AUTH. // Renamed to ENABLED for homogeneity with system properties static const bool sCONCURRENT_PEER_AUTH_IS_ENABLED = osi_property_get_bool( "bluetooth.btm.sec.concurrent_peer_auth.enabled", true); return sCONCURRENT_PEER_AUTH_IS_ENABLED; } void NotifyBondingCanceled(tBTM_STATUS btm_status) { if (btm_cb.api.p_bond_cancel_cmpl_callback) { btm_cb.api.p_bond_cancel_cmpl_callback(BTM_SUCCESS); Loading Loading @@ -3407,11 +3415,9 @@ void btm_sec_encrypt_change(uint16_t handle, tHCI_STATUS status, __func__, p_dev_rec, p_dev_rec->p_callback); p_dev_rec->p_callback = NULL; l2cu_resubmit_pending_sec_req(&p_dev_rec->bd_addr); #ifdef BTM_DISABLE_CONCURRENT_PEER_AUTH } else if (BTM_DISABLE_CONCURRENT_PEER_AUTH && } else if (!concurrentPeerAuthIsEnabled() && p_dev_rec->sec_state == BTM_SEC_STATE_AUTHENTICATING) { p_dev_rec->sec_state = BTM_SEC_STATE_IDLE; #endif } return; } Loading Loading @@ -4036,10 +4042,9 @@ void btm_sec_link_key_request(const uint8_t* p_event) { tBTM_SEC_DEV_REC* p_dev_rec = btm_find_or_alloc_dev(bda); VLOG(2) << __func__ << " bda: " << bda; #if (defined(BTM_DISABLE_CONCURRENT_PEER_AUTH) && \ (BTM_DISABLE_CONCURRENT_PEER_AUTH == TRUE)) if (!concurrentPeerAuthIsEnabled()) { p_dev_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING; #endif } if ((btm_cb.pairing_state == BTM_PAIR_STATE_WAIT_PIN_REQ) && (btm_cb.collision_start_time != 0) && Loading Loading
system/internal_include/bt_target.h +0 −4 Original line number Diff line number Diff line Loading @@ -1026,8 +1026,4 @@ #include "bt_trace.h" #ifndef BTM_DISABLE_CONCURRENT_PEER_AUTH #define BTM_DISABLE_CONCURRENT_PEER_AUTH FALSE #endif #endif /* BT_TARGET_H */
system/stack/btm/btm_sec.cc +12 −7 Original line number Diff line number Diff line Loading @@ -154,6 +154,14 @@ static void NotifyBondingChange(tBTM_SEC_DEV_REC& p_dev_rec, } } static bool concurrentPeerAuthIsEnabled() { // Was previously named BTM_DISABLE_CONCURRENT_PEER_AUTH. // Renamed to ENABLED for homogeneity with system properties static const bool sCONCURRENT_PEER_AUTH_IS_ENABLED = osi_property_get_bool( "bluetooth.btm.sec.concurrent_peer_auth.enabled", true); return sCONCURRENT_PEER_AUTH_IS_ENABLED; } void NotifyBondingCanceled(tBTM_STATUS btm_status) { if (btm_cb.api.p_bond_cancel_cmpl_callback) { btm_cb.api.p_bond_cancel_cmpl_callback(BTM_SUCCESS); Loading Loading @@ -3407,11 +3415,9 @@ void btm_sec_encrypt_change(uint16_t handle, tHCI_STATUS status, __func__, p_dev_rec, p_dev_rec->p_callback); p_dev_rec->p_callback = NULL; l2cu_resubmit_pending_sec_req(&p_dev_rec->bd_addr); #ifdef BTM_DISABLE_CONCURRENT_PEER_AUTH } else if (BTM_DISABLE_CONCURRENT_PEER_AUTH && } else if (!concurrentPeerAuthIsEnabled() && p_dev_rec->sec_state == BTM_SEC_STATE_AUTHENTICATING) { p_dev_rec->sec_state = BTM_SEC_STATE_IDLE; #endif } return; } Loading Loading @@ -4036,10 +4042,9 @@ void btm_sec_link_key_request(const uint8_t* p_event) { tBTM_SEC_DEV_REC* p_dev_rec = btm_find_or_alloc_dev(bda); VLOG(2) << __func__ << " bda: " << bda; #if (defined(BTM_DISABLE_CONCURRENT_PEER_AUTH) && \ (BTM_DISABLE_CONCURRENT_PEER_AUTH == TRUE)) if (!concurrentPeerAuthIsEnabled()) { p_dev_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING; #endif } if ((btm_cb.pairing_state == BTM_PAIR_STATE_WAIT_PIN_REQ) && (btm_cb.collision_start_time != 0) && Loading