Address media button session being changed
Problem: A remote device (e.g. phone) sends a play command to the car bluetooth stack and bluetooth process doesn't have an audio focus and other app has an audio focus. It results in BT to become the default media button session until the other media app sends media/audio events to media service. Media session service consumes bunch of signals in order to promote a session to default media button session One of the signal is from the audio player on when a stream starts. Solution: Bluetooth process will start the decoding (i.e. start the track stream) only once the audio focus is available. If the audio focus is unavailable then it will not flush the audio buffer to the AAudio stream. Since the audio stream doesn't result in audio config change. The media session service never receives the callback about any BT audio being changed and doesn't result in BT media session to become the default button session. Bug:273543318 Tag: #stability Test: Tested by playing the audio after acquiring the focus manually. Test: Tested the scenario where other media app was the primary focus holder and initiated a media play command from the remote device. It didn't resulted in BT to become the media button session. Change-Id: Id3c731c4f7aa4e86d77a3ad248bf2edab4338fe1
Loading
Please register or sign in to comment