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
89cfa4df
authored
May 10, 2021
by
olly
Committed by
Oliver Woodman
May 10, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove some deprecated Player methods
PiperOrigin-RevId: 372981744
parent
d282ad25
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
39 deletions
RELEASENOTES.md
library/common/src/main/java/com/google/android/exoplayer2/BasePlayer.java
library/common/src/main/java/com/google/android/exoplayer2/Player.java
RELEASENOTES.md
View file @
89cfa4df
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
### dev-v2 (not yet released)
### dev-v2 (not yet released)
*
Remove deprecated symbols:
*
Remove deprecated symbols:
*
Remove
`Player.getPlaybackError`
. Use
`Player.getPlayerError`
instead.
*
Remove
`Player.getCurrentTag`
. Use
`Player.getCurrentMediaItem`
and
`MediaIteam.PlaybackProperties.tag`
instead.
*
Remove
`PlaybackPreparer`
. UI components that previously had
*
Remove
`PlaybackPreparer`
. UI components that previously had
`setPlaybackPreparer`
methods will now call
`Player.prepare`
by default.
`setPlaybackPreparer`
methods will now call
`Player.prepare`
by default.
If this behavior is sufficient, use of
`PlaybackPreparer`
can be removed
If this behavior is sufficient, use of
`PlaybackPreparer`
can be removed
...
...
library/common/src/main/java/com/google/android/exoplayer2/BasePlayer.java
View file @
89cfa4df
...
@@ -86,14 +86,6 @@ public abstract class BasePlayer implements Player {
...
@@ -86,14 +86,6 @@ public abstract class BasePlayer implements Player {
return
getAvailableCommands
().
contains
(
command
);
return
getAvailableCommands
().
contains
(
command
);
}
}
/** @deprecated Use {@link #getPlayerError()} instead. */
@Deprecated
@Override
@Nullable
public
final
ExoPlaybackException
getPlaybackError
()
{
return
getPlayerError
();
}
@Override
@Override
public
final
void
play
()
{
public
final
void
play
()
{
setPlayWhenReady
(
true
);
setPlayWhenReady
(
true
);
...
@@ -180,24 +172,6 @@ public abstract class BasePlayer implements Player {
...
@@ -180,24 +172,6 @@ public abstract class BasePlayer implements Player {
getCurrentWindowIndex
(),
getRepeatModeForNavigation
(),
getShuffleModeEnabled
());
getCurrentWindowIndex
(),
getRepeatModeForNavigation
(),
getShuffleModeEnabled
());
}
}
/**
* @deprecated Use {@link #getCurrentMediaItem()} and {@link MediaItem.PlaybackProperties#tag}
* instead.
*/
@Deprecated
@Override
@Nullable
public
final
Object
getCurrentTag
()
{
Timeline
timeline
=
getCurrentTimeline
();
if
(
timeline
.
isEmpty
())
{
return
null
;
}
@Nullable
MediaItem
.
PlaybackProperties
playbackProperties
=
timeline
.
getWindow
(
getCurrentWindowIndex
(),
window
).
mediaItem
.
playbackProperties
;
return
playbackProperties
!=
null
?
playbackProperties
.
tag
:
null
;
}
@Override
@Override
@Nullable
@Nullable
public
final
MediaItem
getCurrentMediaItem
()
{
public
final
MediaItem
getCurrentMediaItem
()
{
...
...
library/common/src/main/java/com/google/android/exoplayer2/Player.java
View file @
89cfa4df
...
@@ -1337,11 +1337,6 @@ public interface Player {
...
@@ -1337,11 +1337,6 @@ public interface Player {
@Nullable
@Nullable
ExoPlaybackException
getPlayerError
();
ExoPlaybackException
getPlayerError
();
/** @deprecated Use {@link #getPlayerError()} instead. */
@Deprecated
@Nullable
ExoPlaybackException
getPlaybackError
();
/**
/**
* Resumes playback as soon as {@link #getPlaybackState()} == {@link #STATE_READY}. Equivalent to
* Resumes playback as soon as {@link #getPlaybackState()} == {@link #STATE_READY}. Equivalent to
* {@code setPlayWhenReady(true)}.
* {@code setPlayWhenReady(true)}.
...
@@ -1631,14 +1626,6 @@ public interface Player {
...
@@ -1631,14 +1626,6 @@ public interface Player {
int
getPreviousWindowIndex
();
int
getPreviousWindowIndex
();
/**
/**
* @deprecated Use {@link #getCurrentMediaItem()} and {@link MediaItem.PlaybackProperties#tag}
* instead.
*/
@Deprecated
@Nullable
Object
getCurrentTag
();
/**
* Returns the media item of the current window in the timeline. May be null if the timeline is
* Returns the media item of the current window in the timeline. May be null if the timeline is
* empty.
* empty.
*
*
...
...
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