Re-enable the A2DP unit tests
* Update/fix the A2dpServiceTest and A2dpStateMachineTest unit tests
to accomodate usage of A2dpService.canConnectToDevice()
* Use a better mechanism to start/stop A2DP service in A2dpServiceTest
* Replace usage of when(...).thenReturn(...) with doReturn(...).when(...)
for Mockito stubbing
* Update A2dpService's inners visibility for testing
Fixes: 72460491
Test: runtest bluetooth -c com.android.bluetooth.a2dp.A2dpServiceTest
runtest bluetooth -c com.android.bluetooth.a2dp.A2dpStateMachineTest
Change-Id: I31ebb2acf561561ad648501490dd5a6c1edb366a
3 files changed