From 378383f0b03728c0f147a2fb8a3215e85d87a712 Mon Sep 17 00:00:00 2001 From: Sunny Kapdi Date: Fri, 25 May 2018 09:29:16 -0700 Subject: [PATCH] A2DP Offload: Avoid Offload_start/stop from remote When DUT is A2DP Source, and remote initiates start we suspend it immediately. There is no need to do Offload_start/stop in this case. Also, the offload start/stop was coming out of sync here. Bug: 80284000 Test: Manual Change-Id: If54c28188e7432ebcba639cd2fbfe81536c2f2e6 Merged-In: If54c28188e7432ebcba639cd2fbfe81536c2f2e6 (cherry picked from commit c2b928c8893ee376578769b64c5be332f03a9806) --- bta/av/bta_av_aact.cc | 1 + btif/src/btif_a2dp.cc | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/bta/av/bta_av_aact.cc b/bta/av/bta_av_aact.cc index 3f96bd7e7..997f021ca 100644 --- a/bta/av/bta_av_aact.cc +++ b/bta/av/bta_av_aact.cc @@ -898,6 +898,7 @@ void bta_av_cleanup(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) { /* if de-registering shut everything down */ msg.hdr.layer_specific = p_scb->hndl; p_scb->started = false; + p_scb->offload_started = false; p_scb->use_rtp_header_marker_bit = false; p_scb->cong = false; p_scb->role = role; diff --git a/btif/src/btif_a2dp.cc b/btif/src/btif_a2dp.cc index 952461631..d7235eb49 100644 --- a/btif/src/btif_a2dp.cc +++ b/btif/src/btif_a2dp.cc @@ -82,11 +82,6 @@ bool btif_a2dp_on_started(const RawAddress& peer_addr, } ack = true; } - } else { - // We were started remotely - if (btif_av_is_a2dp_offload_enabled()) { - btif_av_stream_start_offload(); - } } /* media task is autostarted upon a2dp audiopath connection */ -- 2.11.0