Stop A2DP stream when shutting down A2DP source.

When shutting down a2dp source,
A2DP source set StateShuttingDown state too fast cause the A2DP doesn’t stop stream.
Will try to stop A2DP when doing A2DP source end session.

Bug: 116317072
Bug: 112279820
Test: Build Pass, BT off/on when play A2DP
Change-Id: I6bfb5c235da1ff4a7e6814bae3a98ae7dd1788aa
(cherry picked from commit cdcdca546f533b55a697abd4cedafec14fb2ff6a)
diff --git a/btif/src/btif_a2dp_source.cc b/btif/src/btif_a2dp_source.cc
index efd842b..78e5a4e 100644
--- a/btif/src/btif_a2dp_source.cc
+++ b/btif/src/btif_a2dp_source.cc
@@ -529,7 +529,8 @@
     BluetoothMetricsLogger::GetInstance()->LogBluetoothSessionEnd(
         system_bt_osi::DISCONNECT_REASON_UNKNOWN, 0);
   }
-  if (btif_a2dp_source_cb.State() == BtifA2dpSource::kStateRunning) {
+  if ((btif_a2dp_source_cb.State() == BtifA2dpSource::kStateRunning) ||
+      (btif_a2dp_source_cb.State() == BtifA2dpSource::kStateShuttingDown)) {
     btif_av_stream_stop(peer_address);
   } else {
     LOG_ERROR(LOG_TAG, "%s: A2DP Source media task is not running", __func__);