Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3acd8a60
authored
Apr 23, 2019
by
tonihei
Committed by
Oliver Woodman
Apr 26, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove unused PlaybackInfo.resetToNewPosition
PiperOrigin-RevId: 244838165
parent
9441f724
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
31 deletions
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java
library/core/src/main/java/com/google/android/exoplayer2/PlaybackInfo.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java
View file @
3acd8a60
...
@@ -628,8 +628,11 @@ import java.util.concurrent.CopyOnWriteArrayList;
...
@@ -628,8 +628,11 @@ import java.util.concurrent.CopyOnWriteArrayList;
if
(
playbackInfo
.
startPositionUs
==
C
.
TIME_UNSET
)
{
if
(
playbackInfo
.
startPositionUs
==
C
.
TIME_UNSET
)
{
// Replace internal unset start position with externally visible start position of zero.
// Replace internal unset start position with externally visible start position of zero.
playbackInfo
=
playbackInfo
=
playbackInfo
.
resetToNewPosition
(
playbackInfo
.
copyWithNewPosition
(
playbackInfo
.
periodId
,
/* startPositionUs= */
0
,
playbackInfo
.
contentPositionUs
);
playbackInfo
.
periodId
,
/* positionUs= */
0
,
playbackInfo
.
contentPositionUs
,
playbackInfo
.
totalBufferedDurationUs
);
}
}
if
(!
this
.
playbackInfo
.
timeline
.
isEmpty
()
&&
playbackInfo
.
timeline
.
isEmpty
())
{
if
(!
this
.
playbackInfo
.
timeline
.
isEmpty
()
&&
playbackInfo
.
timeline
.
isEmpty
())
{
// Update the masking variables, which are used when the timeline becomes empty.
// Update the masking variables, which are used when the timeline becomes empty.
...
...
library/core/src/main/java/com/google/android/exoplayer2/PlaybackInfo.java
View file @
3acd8a60
...
@@ -170,35 +170,7 @@ import com.google.android.exoplayer2.trackselection.TrackSelectorResult;
...
@@ -170,35 +170,7 @@ import com.google.android.exoplayer2.trackselection.TrackSelectorResult;
}
}
/**
/**
* Copies playback info and resets playing and loading position.
* Copies playback info with new playing position.
*
* @param periodId New playing and loading {@link MediaPeriodId}.
* @param startPositionUs New start position. See {@link #startPositionUs}.
* @param contentPositionUs New content position. See {@link #contentPositionUs}. Value is ignored
* if {@code periodId.isAd()} is true.
* @return Copied playback info with reset position.
*/
@CheckResult
public
PlaybackInfo
resetToNewPosition
(
MediaPeriodId
periodId
,
long
startPositionUs
,
long
contentPositionUs
)
{
return
new
PlaybackInfo
(
timeline
,
manifest
,
periodId
,
startPositionUs
,
periodId
.
isAd
()
?
contentPositionUs
:
C
.
TIME_UNSET
,
playbackState
,
isLoading
,
trackGroups
,
trackSelectorResult
,
periodId
,
startPositionUs
,
/* totalBufferedDurationUs= */
0
,
startPositionUs
);
}
/**
* Copied playback info with new playing position.
*
*
* @param periodId New playing media period. See {@link #periodId}.
* @param periodId New playing media period. See {@link #periodId}.
* @param positionUs New position. See {@link #positionUs}.
* @param positionUs New position. See {@link #positionUs}.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment