Loading
Floss: clear a2dp_pending_cmd_ set in StopRequest
`StopRequest` sets `a2dp_pending_cmd_` unconditionally and expects it to be cleared in `btif_a2dp_source_on_stopped`. However, that function only clears `a2dp_pending_cmd_` if the a2dp state is not off, and this could be hard to guarantee and error-prone. If `a2dp_pending_cmd_` does not get cleared in that case, it will stay there and block further requests (e.g., StartRequest). In this CL, we clear the variable the same way it is done in `audio_hal_interface/a2dp_encoding.cc`, during `end_session`. Also, we skip `stop_audio_request` in the interface when there is no active stream on any A2DP device. Bug: 240641968 Tag: #floss Test: Build and verify Change-Id: I1107620a79f0347b9f23dd8e11e2bd4f8f034454