Fix is for TDIS-6026, TZSP-6058
When switching from receiver- or speaker-audio path to BT-headset in PR3, changing audio-route path to BT-headset
fails in voicecall_snd_change_path(), because VCONF-value 'memory/bluetooth/btsco' will be set by BT-framework
to TRUE just AFTER checking it, so too late.
In Lunchbox, 'memory/bluetooth/btsco' will be set earlier, so voicecall_snd_change_path_real()
will be called in voicecall_snd_change_path().
Later even after succesfull receive of __vc_bt_ag_sco_state_changed_cb()-event, 'bt_connected'-flag is still
FALSE (because being earlier in receiver/speaker), so audio-path will not be changed even in this function.
'bt_connected'-flag will be set after __vc_bt_audio_connection_state_changed_cb() event,
but also now audio-path change fails in __vc_bt_handle_connectivity_event(), because it will be done only, if 'bt_connected' is FALSE.
So change of the audio-route never succeeds in PR3 after being earlier in receiver/speaker!
CALL_ENG_DEBUG(ENG_DEBUG, "Event: %s(%d)", gszbt_req_event[pbt_info->param1], pbt_info->param1);
- /*HS Connection not required for sending response to VC_BT_AG_REQ_CALL_STATUS */
- if ((FALSE == pcall_core->bt_connected) && (VC_BT_AG_REQ_CALL_STATUS != pbt_info->param1)) {
+ /*HS Connection not required for sending response to VC_BT_AG_REQ_CALL_STATUS or VC_BT_AG_REQ_SWITCH_TO_HEADSET */
+ if ((FALSE == pcall_core->bt_connected) && (VC_BT_AG_REQ_CALL_STATUS != pbt_info->param1) && (VC_BT_AG_REQ_SWITCH_TO_HEADSET != pbt_info->param1)) {
CALL_ENG_DEBUG(ENG_ERR, "BT not connected, Ignoring BT Events, BT Event= %d", pbt_info->param1);
return TRUE;
}