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

Skip to content
Commit 9785fcd4 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Add missing Avrcp.doQuit() call during A2dpService stop()

During graceful shutdown of A2DP, proper cleanup of AVRCP
requires calling both Avrcp.doQuit() and Avrcp.cleanup() .

Also, reorder the AVRCP-related operations inside A2dpService.start()
and A2dpService.stop():
 - Avrcp.make() before preparing the A2DP state machines
 - Avrcp.doQuit() and Avrcp.cleanup() after shutting down the A2DP state
   machines.
This reordering is needed to avoid a race condition during
A2dpService graceful shutdown:
  A2dpStateMachine -> A2dpService.setAvrcpAudioState() ->
     mAvrcp.setA2dpAudioState()
while right before the last call mAvrcp was assigned to null
inside stop().

Bug: 73547689
Test: Manual (enable/disable Bluetooth)
      Unit tests pass
Change-Id: I8b30a0ff840cf73e8e9cce06b52659b2a17cac5b
parent a191bb23
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