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

Skip to content
Commit 294ff299 authored by Marie Janssen's avatar Marie Janssen Committed by Andre Eisenbach
Browse files

AVRCP: Report current playing item for now playing

According to the Bluetooth AVRCP 1.6.1 (p79):
 In the case where the media player does not natively support a Now
 Playing folder, it may present a folder containing one item, the
 currently playing media element, as would be returned by a
 GetElementAttributes command with the now playing UID.

Send this one-item list back when we don't have a queue, and try to
refresh the queue from the current player when we need to.

When a browsable player is selected, it's illegal for us to send a
response to EVT_TRACK_CHANGED with the now playing UID, so make up a
fake qid for this one item list in this case, since ids are only valid
within the current folder for database-unaware players anyway.

Respond with "no players available" when we actually don't have a
player.

Also fixes a bug where we would try to send the current queue back twice,
and reduces logspam in the main message handler by half.

Test: connect to carkit, test basic playback
Bug: 32800406
Bug: 36645066
Bug: 36055995
Bug: 36645066
Change-Id: Ia16c05bfc849359ca857b03edd5a75e21f13d6fb
parent b30a2ec9
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