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

Skip to content
Commit ec038884 authored by Sandeep Samdaria's avatar Sandeep Samdaria
Browse files

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
parent 6f89f10e
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