Loading system/bta/ag/bta_ag_at.cc +1 −6 Original line number Diff line number Diff line Loading @@ -140,12 +140,7 @@ void bta_ag_process_at(tBTA_AG_AT_CB* p_cb, char* p_end) { /* if it's a set integer check max, min range */ if (arg_type == BTA_AG_AT_SET && p_cb->p_at_tbl[idx].fmt == BTA_AG_AT_INT) { #if TARGET_FLOSS if (true) #else if (com::android::bluetooth::flags::bta_ag_cmd_brsf_allow_uint32()) #endif { if (com::android::bluetooth::flags::bta_ag_cmd_brsf_allow_uint32()) { if (p_cb->p_at_tbl[idx].command_id == BTA_AG_LOCAL_EVT_BRSF) { // Per HFP v1.9 BRSF could be 32-bit integer and we should ignore // all reserved bits rather than responding ERROR. Loading system/bta/ag/bta_ag_sco.cc +1 −33 Original line number Diff line number Diff line Loading @@ -221,11 +221,7 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) { /* Restore settings */ if (bta_ag_cb.sco.p_curr_scb->inuse_codec == UUID_CODEC_MSBC || bta_ag_cb.sco.p_curr_scb->inuse_codec == UUID_CODEC_LC3 || aptx_voice || #if TARGET_FLOSS (true && #else (com::android::bluetooth::flags::fix_hfp_qual_1_9() && #endif bta_ag_cb.sco.p_curr_scb->inuse_codec == UUID_CODEC_CVSD && bta_ag_cb.sco.p_curr_scb->codec_cvsd_settings != BTA_AG_SCO_CVSD_SETTINGS_S1)) { Loading @@ -239,20 +235,12 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) { * 'Safe setting' first. If T1 also fails, try CVSD * same operations for LC3 settings */ if (bta_ag_sco_is_opening(bta_ag_cb.sco.p_curr_scb) && #if TARGET_FLOSS (false || #else (!com::android::bluetooth::flags::fix_hfp_qual_1_9() || #endif bta_ag_cb.sco.is_local)) { /* Don't bother to edit |p_curr_scb->state| because it is in * |BTA_AG_OPEN_ST|, which has the same value as |BTA_AG_SCO_CODEC_ST| */ #if TARGET_FLOSS if (false) { #else if (!com::android::bluetooth::flags::fix_hfp_qual_1_9()) { #endif bta_ag_cb.sco.p_curr_scb->state = BTA_AG_SCO_CODEC_ST; } if (bta_ag_cb.sco.p_curr_scb->inuse_codec == UUID_CODEC_LC3) { Loading Loading @@ -283,7 +271,7 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) { } } else { // Entering this block implies // - |fix_hfp_qual_1_9| is enabled or is in Floss, AND // - |fix_hfp_qual_1_9| is enabled, AND // - we just failed CVSD S2+. log::warn( "eSCO/SCO failed to open, falling back to CVSD S1 settings"); Loading @@ -293,21 +281,13 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) { } } } else if (bta_ag_sco_is_opening(bta_ag_cb.sco.p_curr_scb) && #if TARGET_FLOSS (false || #else (!com::android::bluetooth::flags::fix_hfp_qual_1_9() || #endif bta_ag_cb.sco.is_local)) { if (com::android::bluetooth::flags:: retry_esco_with_zero_retransmission_effort() && bta_ag_cb.sco.p_curr_scb->retransmission_effort_retries == 0) { bta_ag_cb.sco.p_curr_scb->retransmission_effort_retries++; #if TARGET_FLOSS if (false) { #else if (!com::android::bluetooth::flags::fix_hfp_qual_1_9()) { #endif bta_ag_cb.sco.p_curr_scb->state = BTA_AG_SCO_CODEC_ST; } log::warn("eSCO/SCO failed to open, retry with retransmission_effort"); Loading Loading @@ -541,11 +521,7 @@ void bta_ag_create_sco(tBTA_AG_SCB* p_scb, bool is_orig) { params = esco_parameters_for_codec(ESCO_CODEC_SWB_Q0, true); } } else { #if TARGET_FLOSS if (true && #else if (com::android::bluetooth::flags::fix_hfp_qual_1_9() && #endif p_scb->codec_cvsd_settings == BTA_AG_SCO_CVSD_SETTINGS_S1) { params = esco_parameters_for_codec(ESCO_CODEC_CVSD_S1, offload); } else { Loading Loading @@ -676,11 +652,7 @@ void bta_ag_create_pending_sco(tBTA_AG_SCB* p_scb, bool is_local) { params = esco_parameters_for_codec(ESCO_CODEC_MSBC_T1, offload); } } else { #if TARGET_FLOSS if (true && #else if (com::android::bluetooth::flags::fix_hfp_qual_1_9() && #endif p_scb->codec_cvsd_settings == BTA_AG_SCO_CVSD_SETTINGS_S1) { params = esco_parameters_for_codec(ESCO_CODEC_CVSD_S1, offload); } else { Loading Loading @@ -1590,11 +1562,7 @@ void bta_ag_sco_conn_close(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& /* data */) { retry_esco_with_zero_retransmission_effort() && p_scb->retransmission_effort_retries == 1) || aptx_voice || #if TARGET_FLOSS (true && #else (com::android::bluetooth::flags::fix_hfp_qual_1_9() && #endif p_scb->sco_codec == BTM_SCO_CODEC_CVSD && p_scb->codec_cvsd_settings == BTA_AG_SCO_CVSD_SETTINGS_S1 && p_scb->trying_cvsd_safe_settings))) { Loading system/bta/dm/bta_dm_device_search.cc +0 −2 Original line number Diff line number Diff line Loading @@ -164,13 +164,11 @@ static void bta_dm_search_cancel() { active */ else if (!bta_dm_search_cb.name_discover_done) { get_btm_client_interface().peer.BTM_CancelRemoteDeviceName(); #ifndef TARGET_FLOSS /* bta_dm_search_cmpl is called when receiving the remote name cancel evt */ if (!com::android::bluetooth::flags:: bta_dm_defer_device_discovery_state_change_until_rnr_complete()) { bta_dm_search_cmpl(); } #endif } else { bta_dm_inq_cmpl(); } Loading system/bta/dm/bta_dm_disc_legacy.cc +0 −2 Original line number Diff line number Diff line Loading @@ -322,13 +322,11 @@ static void bta_dm_search_cancel() { active */ else if (!bta_dm_search_cb.name_discover_done) { get_btm_client_interface().peer.BTM_CancelRemoteDeviceName(); #ifndef TARGET_FLOSS /* bta_dm_search_cmpl is called when receiving the remote name cancel evt */ if (!com::android::bluetooth::flags:: bta_dm_defer_device_discovery_state_change_until_rnr_complete()) { bta_dm_search_cmpl(); } #endif } else { bta_dm_inq_cmpl(); } Loading system/bta/jv/bta_jv_act.cc +1 −6 Original line number Diff line number Diff line Loading @@ -1473,12 +1473,7 @@ void bta_jv_rfcomm_connect(tBTA_SEC sec_mask, uint8_t remote_scn, memset(&evt_data, 0, sizeof(evt_data)); evt_data.status = tBTA_JV_STATUS::SUCCESS; #ifdef TARGET_FLOSS if (true) #else if (com::android::bluetooth::flags::rfcomm_always_use_mitm()) #endif { if (com::android::bluetooth::flags::rfcomm_always_use_mitm()) { // Update security service record for RFCOMM client so that // secure RFCOMM connection will be authenticated with MTIM protection // while creating the L2CAP connection. Loading Loading
system/bta/ag/bta_ag_at.cc +1 −6 Original line number Diff line number Diff line Loading @@ -140,12 +140,7 @@ void bta_ag_process_at(tBTA_AG_AT_CB* p_cb, char* p_end) { /* if it's a set integer check max, min range */ if (arg_type == BTA_AG_AT_SET && p_cb->p_at_tbl[idx].fmt == BTA_AG_AT_INT) { #if TARGET_FLOSS if (true) #else if (com::android::bluetooth::flags::bta_ag_cmd_brsf_allow_uint32()) #endif { if (com::android::bluetooth::flags::bta_ag_cmd_brsf_allow_uint32()) { if (p_cb->p_at_tbl[idx].command_id == BTA_AG_LOCAL_EVT_BRSF) { // Per HFP v1.9 BRSF could be 32-bit integer and we should ignore // all reserved bits rather than responding ERROR. Loading
system/bta/ag/bta_ag_sco.cc +1 −33 Original line number Diff line number Diff line Loading @@ -221,11 +221,7 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) { /* Restore settings */ if (bta_ag_cb.sco.p_curr_scb->inuse_codec == UUID_CODEC_MSBC || bta_ag_cb.sco.p_curr_scb->inuse_codec == UUID_CODEC_LC3 || aptx_voice || #if TARGET_FLOSS (true && #else (com::android::bluetooth::flags::fix_hfp_qual_1_9() && #endif bta_ag_cb.sco.p_curr_scb->inuse_codec == UUID_CODEC_CVSD && bta_ag_cb.sco.p_curr_scb->codec_cvsd_settings != BTA_AG_SCO_CVSD_SETTINGS_S1)) { Loading @@ -239,20 +235,12 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) { * 'Safe setting' first. If T1 also fails, try CVSD * same operations for LC3 settings */ if (bta_ag_sco_is_opening(bta_ag_cb.sco.p_curr_scb) && #if TARGET_FLOSS (false || #else (!com::android::bluetooth::flags::fix_hfp_qual_1_9() || #endif bta_ag_cb.sco.is_local)) { /* Don't bother to edit |p_curr_scb->state| because it is in * |BTA_AG_OPEN_ST|, which has the same value as |BTA_AG_SCO_CODEC_ST| */ #if TARGET_FLOSS if (false) { #else if (!com::android::bluetooth::flags::fix_hfp_qual_1_9()) { #endif bta_ag_cb.sco.p_curr_scb->state = BTA_AG_SCO_CODEC_ST; } if (bta_ag_cb.sco.p_curr_scb->inuse_codec == UUID_CODEC_LC3) { Loading Loading @@ -283,7 +271,7 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) { } } else { // Entering this block implies // - |fix_hfp_qual_1_9| is enabled or is in Floss, AND // - |fix_hfp_qual_1_9| is enabled, AND // - we just failed CVSD S2+. log::warn( "eSCO/SCO failed to open, falling back to CVSD S1 settings"); Loading @@ -293,21 +281,13 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) { } } } else if (bta_ag_sco_is_opening(bta_ag_cb.sco.p_curr_scb) && #if TARGET_FLOSS (false || #else (!com::android::bluetooth::flags::fix_hfp_qual_1_9() || #endif bta_ag_cb.sco.is_local)) { if (com::android::bluetooth::flags:: retry_esco_with_zero_retransmission_effort() && bta_ag_cb.sco.p_curr_scb->retransmission_effort_retries == 0) { bta_ag_cb.sco.p_curr_scb->retransmission_effort_retries++; #if TARGET_FLOSS if (false) { #else if (!com::android::bluetooth::flags::fix_hfp_qual_1_9()) { #endif bta_ag_cb.sco.p_curr_scb->state = BTA_AG_SCO_CODEC_ST; } log::warn("eSCO/SCO failed to open, retry with retransmission_effort"); Loading Loading @@ -541,11 +521,7 @@ void bta_ag_create_sco(tBTA_AG_SCB* p_scb, bool is_orig) { params = esco_parameters_for_codec(ESCO_CODEC_SWB_Q0, true); } } else { #if TARGET_FLOSS if (true && #else if (com::android::bluetooth::flags::fix_hfp_qual_1_9() && #endif p_scb->codec_cvsd_settings == BTA_AG_SCO_CVSD_SETTINGS_S1) { params = esco_parameters_for_codec(ESCO_CODEC_CVSD_S1, offload); } else { Loading Loading @@ -676,11 +652,7 @@ void bta_ag_create_pending_sco(tBTA_AG_SCB* p_scb, bool is_local) { params = esco_parameters_for_codec(ESCO_CODEC_MSBC_T1, offload); } } else { #if TARGET_FLOSS if (true && #else if (com::android::bluetooth::flags::fix_hfp_qual_1_9() && #endif p_scb->codec_cvsd_settings == BTA_AG_SCO_CVSD_SETTINGS_S1) { params = esco_parameters_for_codec(ESCO_CODEC_CVSD_S1, offload); } else { Loading Loading @@ -1590,11 +1562,7 @@ void bta_ag_sco_conn_close(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& /* data */) { retry_esco_with_zero_retransmission_effort() && p_scb->retransmission_effort_retries == 1) || aptx_voice || #if TARGET_FLOSS (true && #else (com::android::bluetooth::flags::fix_hfp_qual_1_9() && #endif p_scb->sco_codec == BTM_SCO_CODEC_CVSD && p_scb->codec_cvsd_settings == BTA_AG_SCO_CVSD_SETTINGS_S1 && p_scb->trying_cvsd_safe_settings))) { Loading
system/bta/dm/bta_dm_device_search.cc +0 −2 Original line number Diff line number Diff line Loading @@ -164,13 +164,11 @@ static void bta_dm_search_cancel() { active */ else if (!bta_dm_search_cb.name_discover_done) { get_btm_client_interface().peer.BTM_CancelRemoteDeviceName(); #ifndef TARGET_FLOSS /* bta_dm_search_cmpl is called when receiving the remote name cancel evt */ if (!com::android::bluetooth::flags:: bta_dm_defer_device_discovery_state_change_until_rnr_complete()) { bta_dm_search_cmpl(); } #endif } else { bta_dm_inq_cmpl(); } Loading
system/bta/dm/bta_dm_disc_legacy.cc +0 −2 Original line number Diff line number Diff line Loading @@ -322,13 +322,11 @@ static void bta_dm_search_cancel() { active */ else if (!bta_dm_search_cb.name_discover_done) { get_btm_client_interface().peer.BTM_CancelRemoteDeviceName(); #ifndef TARGET_FLOSS /* bta_dm_search_cmpl is called when receiving the remote name cancel evt */ if (!com::android::bluetooth::flags:: bta_dm_defer_device_discovery_state_change_until_rnr_complete()) { bta_dm_search_cmpl(); } #endif } else { bta_dm_inq_cmpl(); } Loading
system/bta/jv/bta_jv_act.cc +1 −6 Original line number Diff line number Diff line Loading @@ -1473,12 +1473,7 @@ void bta_jv_rfcomm_connect(tBTA_SEC sec_mask, uint8_t remote_scn, memset(&evt_data, 0, sizeof(evt_data)); evt_data.status = tBTA_JV_STATUS::SUCCESS; #ifdef TARGET_FLOSS if (true) #else if (com::android::bluetooth::flags::rfcomm_always_use_mitm()) #endif { if (com::android::bluetooth::flags::rfcomm_always_use_mitm()) { // Update security service record for RFCOMM client so that // secure RFCOMM connection will be authenticated with MTIM protection // while creating the L2CAP connection. Loading