mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Remove unused code path
The deleted path was only used if resetPosition=false and clearPlaylist=true, which is never the case. PiperOrigin-RevId: 291154550
This commit is contained in:
parent
23f316d67e
commit
454d4add4a
@ -1125,20 +1125,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
}
|
||||
enabledRenderers = new Renderer[0];
|
||||
|
||||
if (resetPosition) {
|
||||
pendingInitialSeekPosition = null;
|
||||
} else if (clearPlaylist) {
|
||||
// When clearing the playlist, also reset the period-based PlaybackInfo position and convert
|
||||
// existing position to initial seek instead.
|
||||
resetPosition = true;
|
||||
if (pendingInitialSeekPosition == null && !playbackInfo.timeline.isEmpty()) {
|
||||
playbackInfo.timeline.getPeriodByUid(playbackInfo.periodId.periodUid, period);
|
||||
long windowPositionUs = playbackInfo.positionUs + period.getPositionInWindowUs();
|
||||
pendingInitialSeekPosition =
|
||||
new SeekPosition(Timeline.EMPTY, period.windowIndex, windowPositionUs);
|
||||
}
|
||||
}
|
||||
|
||||
queue.clear();
|
||||
shouldContinueLoading = false;
|
||||
Timeline timeline = playbackInfo.timeline;
|
||||
@ -1155,6 +1141,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
long contentPositionUs = playbackInfo.contentPositionUs;
|
||||
boolean resetTrackInfo = clearPlaylist;
|
||||
if (resetPosition) {
|
||||
pendingInitialSeekPosition = null;
|
||||
Pair<MediaPeriodId, Long> firstPeriodAndPosition = getDummyFirstMediaPeriodPosition();
|
||||
mediaPeriodId = firstPeriodAndPosition.first;
|
||||
startPositionUs = firstPeriodAndPosition.second;
|
||||
|
Loading…
x
Reference in New Issue
Block a user