audio hal: fix audio leak when disconnecting A2DP sink

When A2DP sink is disconnected, the A2DP offload path may be
disabled before the audio framework pauses the output stream, in
which case the HAL forces the audio route to speaker.
When this happens, the front end must be muted to avoid audio
leaking over speaker path potentially at full volume if
A2DP absolute volume is enabled.

Bug: 156044862
Test: repro steps in the bug.
Change-Id: I90de8729ac862ca794dbdcf85fc1fa9dfabbf23b
2 files changed
tree: e149fb9a335549bb75211c7acdfd99122ddb184a
  1. hal/
  2. legacy/
  3. post_proc/
  4. visualizer/
  5. voice_processing/
  6. Android.mk
  7. OWNERS