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

Skip to content
Commit 03cd5a71 authored by Ugo Yu's avatar Ugo Yu
Browse files

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
parent 0f5b951d
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