A2DP: Don't suppress noisy intent while stopping A2dpService

- While stopping A2dpService, setActiveDevice(null) is called to
  notify AudioManager the disconnection. However, if A2DP is streaming,
  music won't be stopped by this notification since noisy intent has
  been suppressed due to A2DP is actually still connected.
- Add a function removeActiveDevice() to handle events which needs
  AudioManager to send noisy intent no matter the conection state is.
- Also, we need to store AVRCP volume level since setActiveDevice
  is replaced by removeActiveDevice in A2dpService.stop.

Bug: 80376490
Test: runtest bluetooth -j48
      Turn off Bluetooth while playing A2DP streaming

Change-Id: Ied9efcb608ff5235551a06b5462379ed7a754b6a
1 file changed
tree: 79ec4c8f726744e5196143a3e50ae34f0b0532ca
  1. android/