Skip to content
Snippets Groups Projects
Commit 77596c0f authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Remove deinit_pending flag that is not needed/used

Test: Code compilation
Bug: 74952724
Change-Id: I022e16940c73181f991d528b9c96e2d26151369f
(cherry picked from commit e445b5b8b9225a882136a1c941cf77055540a554)
parent 130f5b5c
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,6 @@ static uint8_t a2dp_cmd_pending = A2DP_CTRL_CMD_NONE;
static Status mapToStatus(uint8_t resp);
uint8_t btif_a2dp_audio_process_request(uint8_t cmd);
static bool deinit_pending = false;
static void btif_a2dp_audio_send_start_req();
static void btif_a2dp_audio_send_suspend_req();
// Delay reporting
......@@ -182,16 +181,11 @@ void btif_a2dp_audio_interface_init() {
LOG_DEBUG(
LOG_TAG, "%s: IBluetoothAudioOffload::getService() returned %p (%s)",
__func__, btAudio.get(), (btAudio->isRemote() ? "remote" : "local"));
deinit_pending = false;
LOG_INFO(LOG_TAG, "%s:Init returned", __func__);
}
void btif_a2dp_audio_interface_deinit() {
LOG_INFO(LOG_TAG, "%s: start", __func__);
if (btAudio != nullptr) {
deinit_pending = true;
}
deinit_pending = false;
btAudio = nullptr;
LOG_INFO(LOG_TAG, "%s: exit", __func__);
}
......@@ -286,11 +280,6 @@ uint8_t btif_a2dp_audio_process_request(uint8_t cmd) {
status = A2DP_CTRL_ACK_INCALL_FAILURE;
break;
}
if (deinit_pending) {
APPL_TRACE_WARNING("%s: deinit pending return disconnected", __func__);
status = A2DP_CTRL_ACK_DISCONNECT_IN_PROGRESS;
break;
}
if (btif_av_stream_started_ready()) {
/*
* Already started, setup audio data channel listener and ACK
......@@ -322,11 +311,6 @@ uint8_t btif_a2dp_audio_process_request(uint8_t cmd) {
break;
case A2DP_CTRL_CMD_STOP:
if (deinit_pending) {
APPL_TRACE_WARNING("%s: deinit pending return disconnected", __func__);
status = A2DP_CTRL_ACK_DISCONNECT_IN_PROGRESS;
break;
}
if (btif_av_get_peer_sep() == AVDT_TSEP_SNK &&
!btif_a2dp_source_is_streaming()) {
/* We are already stopped, just ack back */
......@@ -338,11 +322,6 @@ uint8_t btif_a2dp_audio_process_request(uint8_t cmd) {
break;
case A2DP_CTRL_CMD_SUSPEND:
if (deinit_pending) {
APPL_TRACE_WARNING("%s: deinit pending return disconnected", __func__);
status = A2DP_CTRL_ACK_DISCONNECT_IN_PROGRESS;
break;
}
/* Local suspend */
if (btif_av_stream_started_ready()) {
btif_av_stream_suspend();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment