Loading system/audio_hal_interface/aidl/hfp_client_interface_aidl.cc +9 −3 Original line number Original line Diff line number Diff line Loading @@ -82,16 +82,22 @@ BluetoothAudioCtrlAck HfpTransport::StartRequest() { /* Post start SCO event and wait for sco to open */ /* Post start SCO event and wait for sco to open */ hfp_pending_cmd_ = HFP_CTRL_CMD_START; hfp_pending_cmd_ = HFP_CTRL_CMD_START; // as ConnectAudio only queues the command into main thread, keep PENDING // status auto status = auto status = bluetooth::headset::GetInterface()->ConnectAudio(&cb->peer_addr, 0); bluetooth::headset::GetInterface()->ConnectAudio(&cb->peer_addr, 0); hfp_pending_cmd_ = HFP_CTRL_CMD_NONE; LOG(INFO) << __func__ << ": ConnectAudio status = " << status << " - " LOG(INFO) << __func__ << ": ConnectAudio status = " << status << " - " << bt_status_text(status).c_str(); << bt_status_text(status).c_str(); auto ctrl_ack = status_to_ack_map.find(status); auto ctrl_ack = status_to_ack_map.find(status); if (ctrl_ack == status_to_ack_map.end()) if (ctrl_ack == status_to_ack_map.end()) { LOG_WARN("Unmapped status=%d", status); return BluetoothAudioCtrlAck::FAILURE; return BluetoothAudioCtrlAck::FAILURE; } if (ctrl_ack->second != BluetoothAudioCtrlAck::SUCCESS_FINISHED) { return ctrl_ack->second; return ctrl_ack->second; } } return BluetoothAudioCtrlAck::PENDING; } void HfpTransport::StopRequest() { void HfpTransport::StopRequest() { LOG(INFO) << __func__ << ": handling"; LOG(INFO) << __func__ << ": handling"; Loading Loading
system/audio_hal_interface/aidl/hfp_client_interface_aidl.cc +9 −3 Original line number Original line Diff line number Diff line Loading @@ -82,16 +82,22 @@ BluetoothAudioCtrlAck HfpTransport::StartRequest() { /* Post start SCO event and wait for sco to open */ /* Post start SCO event and wait for sco to open */ hfp_pending_cmd_ = HFP_CTRL_CMD_START; hfp_pending_cmd_ = HFP_CTRL_CMD_START; // as ConnectAudio only queues the command into main thread, keep PENDING // status auto status = auto status = bluetooth::headset::GetInterface()->ConnectAudio(&cb->peer_addr, 0); bluetooth::headset::GetInterface()->ConnectAudio(&cb->peer_addr, 0); hfp_pending_cmd_ = HFP_CTRL_CMD_NONE; LOG(INFO) << __func__ << ": ConnectAudio status = " << status << " - " LOG(INFO) << __func__ << ": ConnectAudio status = " << status << " - " << bt_status_text(status).c_str(); << bt_status_text(status).c_str(); auto ctrl_ack = status_to_ack_map.find(status); auto ctrl_ack = status_to_ack_map.find(status); if (ctrl_ack == status_to_ack_map.end()) if (ctrl_ack == status_to_ack_map.end()) { LOG_WARN("Unmapped status=%d", status); return BluetoothAudioCtrlAck::FAILURE; return BluetoothAudioCtrlAck::FAILURE; } if (ctrl_ack->second != BluetoothAudioCtrlAck::SUCCESS_FINISHED) { return ctrl_ack->second; return ctrl_ack->second; } } return BluetoothAudioCtrlAck::PENDING; } void HfpTransport::StopRequest() { void HfpTransport::StopRequest() { LOG(INFO) << __func__ << ": handling"; LOG(INFO) << __func__ << ": handling"; Loading