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

Skip to content
Commit c292061b authored by Sal Savage's avatar Sal Savage
Browse files

Allow new Now Playing List fetches to happen by cancelling the old request

Problem: The Now Playing List is invalidated when the addressed player
changes. This can happen on initial connection, when the Available Players
change and a player ID is reused, or directly as a result of an Addressed
Player Changed event. Typically, both events come in one after the other,
causing one Now Playing list fetch, immediately followed by another. As
it stands, the first request always finishes, and the future ones are
ignored, despite the list getting cleared/uncached part-way through.
This leads to missing data and/or incorrect lists, which can have
downstream impact on playing items from the Now Playing List as well.

Solution: Let another more recent fetch request for the Now Playing List
invalidate the previous requsst and cause the download process to
restart. These downloads are typically quick and the wasted cycles
downloading sometimes-old-something-invalid data are small, or
necessary.

Tag: #stability
Bug: 177004421
Test: atest AvrcpControllerStateMachine.java
Change-Id: Idcc0a21c966622bfd442ae3b2c7cf1d8f06e75d3
parent c31cc63c
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