Loading system/bta/ag/bta_ag_sco.cc +6 −0 Original line number Original line Diff line number Diff line Loading @@ -370,6 +370,12 @@ static void bta_ag_create_sco(tBTA_AG_SCB* p_scb, bool is_orig) { if (!bta_ag_sco_is_active_device(p_scb->peer_addr)) { if (!bta_ag_sco_is_active_device(p_scb->peer_addr)) { LOG(WARNING) << __func__ << ": device " << p_scb->peer_addr LOG(WARNING) << __func__ << ": device " << p_scb->peer_addr << " is not active, active_device=" << active_device_addr; << " is not active, active_device=" << active_device_addr; if (bta_ag_cb.sco.p_curr_scb != nullptr && bta_ag_cb.sco.p_curr_scb->in_use && p_scb == bta_ag_cb.sco.p_curr_scb) { do_in_bta_thread( FROM_HERE, base::Bind(&bta_ag_sm_execute, p_scb, BTA_AG_SCO_CLOSE_EVT, tBTA_AG_DATA::kEmpty)); } return; return; } } /* Make sure this SCO handle is not already in use */ /* Make sure this SCO handle is not already in use */ Loading system/btif/src/btif_hf.cc +1 −3 Original line number Original line Diff line number Diff line Loading @@ -773,14 +773,12 @@ bt_status_t HeadsetInterface::ConnectAudio(RawAddress* bd_addr) { LOG(ERROR) << ": SLC not connected for " << *bd_addr; LOG(ERROR) << ": SLC not connected for " << *bd_addr; return BT_STATUS_NOT_READY; return BT_STATUS_NOT_READY; } } BTA_AgAudioOpen(btif_hf_cb[idx].handle); // Inform the application that the audio connection has been initiated // successfully do_in_jni_thread(base::Bind(&Callbacks::AudioStateCallback, do_in_jni_thread(base::Bind(&Callbacks::AudioStateCallback, // Manual pointer management for now // Manual pointer management for now base::Unretained(bt_hf_callbacks), base::Unretained(bt_hf_callbacks), BTHF_AUDIO_STATE_CONNECTING, BTHF_AUDIO_STATE_CONNECTING, &btif_hf_cb[idx].connected_bda)); &btif_hf_cb[idx].connected_bda)); BTA_AgAudioOpen(btif_hf_cb[idx].handle); return BT_STATUS_SUCCESS; return BT_STATUS_SUCCESS; } } Loading Loading
system/bta/ag/bta_ag_sco.cc +6 −0 Original line number Original line Diff line number Diff line Loading @@ -370,6 +370,12 @@ static void bta_ag_create_sco(tBTA_AG_SCB* p_scb, bool is_orig) { if (!bta_ag_sco_is_active_device(p_scb->peer_addr)) { if (!bta_ag_sco_is_active_device(p_scb->peer_addr)) { LOG(WARNING) << __func__ << ": device " << p_scb->peer_addr LOG(WARNING) << __func__ << ": device " << p_scb->peer_addr << " is not active, active_device=" << active_device_addr; << " is not active, active_device=" << active_device_addr; if (bta_ag_cb.sco.p_curr_scb != nullptr && bta_ag_cb.sco.p_curr_scb->in_use && p_scb == bta_ag_cb.sco.p_curr_scb) { do_in_bta_thread( FROM_HERE, base::Bind(&bta_ag_sm_execute, p_scb, BTA_AG_SCO_CLOSE_EVT, tBTA_AG_DATA::kEmpty)); } return; return; } } /* Make sure this SCO handle is not already in use */ /* Make sure this SCO handle is not already in use */ Loading
system/btif/src/btif_hf.cc +1 −3 Original line number Original line Diff line number Diff line Loading @@ -773,14 +773,12 @@ bt_status_t HeadsetInterface::ConnectAudio(RawAddress* bd_addr) { LOG(ERROR) << ": SLC not connected for " << *bd_addr; LOG(ERROR) << ": SLC not connected for " << *bd_addr; return BT_STATUS_NOT_READY; return BT_STATUS_NOT_READY; } } BTA_AgAudioOpen(btif_hf_cb[idx].handle); // Inform the application that the audio connection has been initiated // successfully do_in_jni_thread(base::Bind(&Callbacks::AudioStateCallback, do_in_jni_thread(base::Bind(&Callbacks::AudioStateCallback, // Manual pointer management for now // Manual pointer management for now base::Unretained(bt_hf_callbacks), base::Unretained(bt_hf_callbacks), BTHF_AUDIO_STATE_CONNECTING, BTHF_AUDIO_STATE_CONNECTING, &btif_hf_cb[idx].connected_bda)); &btif_hf_cb[idx].connected_bda)); BTA_AgAudioOpen(btif_hf_cb[idx].handle); return BT_STATUS_SUCCESS; return BT_STATUS_SUCCESS; } } Loading