AVRCP: Workaround Queue ID & metadata updates
When a player with a queue updates their track, it comes in two separate parts from MediaController.Callback: - Queue ID is in onPlaybackStateChanged - Metadata is in onMetadataChanged Because the ordering of these two is not specific, both must change before we have a consistent data state to present the carkit if the Media client has a queue. Even though the only thing sent in the Track Changed notification is the Queue ID, the request for metadata often comes before the Metadata has been updated after that notification. Refactor Track Changed notification to keep track of the last data we sent to the controller, and send new tracks when both Queue ID and Metadata have changed. Test: various carkit testing with track skipping Bug: 37707672 Change-Id: Ibf9f725f6912955a65421786068921489dbf8e45 (cherry picked from commit 5aca05c1)
Loading
Please register or sign in to comment