Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ce2a0b6d authored by Jeremy Wu's avatar Jeremy Wu
Browse files

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
parent d6a86101
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment