Monitor AudioManger Playback state to update the AVRCP playback state
Some carkit won't play A2DP audio when AVRCP playback state is paused.
Causing navigation sound not able to heard from carkit speaker if there
is not music playing.
Add registration for onPlaybackConfigChanged can helps to monitor if
there is any audio playback is active, So AVRCP can report correct
playback state to remote to play the audio playback.
Some additonal rules when updating playback state:
- Do not update audio playback state when there is media player playing.
This is to prevent send playback state paused when audio playback and
media player are playing at same time and audio playback stop first.
- Update playback status of acitve media player when audio playbac stop playing
and there is not media player playing.
Bug: 128982202
Test: atest BluetoothInstrumentationTests
Change-Id: I8f28a7eb0c3f923c656c889375c660b38d9e6236
7 files changed