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
1 file changed