Skip to content
Commit 0c0e1bdc authored by Hyundo Moon's avatar Hyundo Moon
Browse files

Change initial value of MediaSessionRecord.mDuration to -1

After the CL "a1385732: AML: Remove unbundling MediaMetadata in
MediaSessionRecord" is merged, MediaController.getPlaybackState()
returned wrong position.

Since the mDuration is initially set to non-negative value,
getStateWithUpdatedPosition() limited the current position to the
duration, which is wrong.

As a result, the below androidx test failed in Q:
 - MediaSessionCompatCallbackTest.testGetPlaybackStateWithPositionUpdate

This CL fixes the problem.

Bug: 121447576
Test: Passed above test
Change-Id: If87c844461a8204f3883cd3081f5c6f057ab36c6
parent 9d3abfbf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment