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
146648ce
authored
Jun 04, 2021
by
aquilescanta
Committed by
bachinger
Jun 08, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Make MediaSessionConnector depend on PlaybackException
PiperOrigin-RevId: 377529353
parent
fd4cfcdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java
View file @
146648ce
...
@@ -44,9 +44,9 @@ import androidx.annotation.Nullable;
...
@@ -44,9 +44,9 @@ import androidx.annotation.Nullable;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.ControlDispatcher
;
import
com.google.android.exoplayer2.ControlDispatcher
;
import
com.google.android.exoplayer2.DefaultControlDispatcher
;
import
com.google.android.exoplayer2.DefaultControlDispatcher
;
import
com.google.android.exoplayer2.ExoPlaybackException
;
import
com.google.android.exoplayer2.ExoPlayerLibraryInfo
;
import
com.google.android.exoplayer2.ExoPlayerLibraryInfo
;
import
com.google.android.exoplayer2.MediaItem
;
import
com.google.android.exoplayer2.MediaItem
;
import
com.google.android.exoplayer2.PlaybackException
;
import
com.google.android.exoplayer2.Player
;
import
com.google.android.exoplayer2.Player
;
import
com.google.android.exoplayer2.Timeline
;
import
com.google.android.exoplayer2.Timeline
;
import
com.google.android.exoplayer2.util.Assertions
;
import
com.google.android.exoplayer2.util.Assertions
;
...
@@ -475,7 +475,7 @@ public final class MediaSessionConnector {
...
@@ -475,7 +475,7 @@ public final class MediaSessionConnector {
private
Map
<
String
,
CustomActionProvider
>
customActionMap
;
private
Map
<
String
,
CustomActionProvider
>
customActionMap
;
@Nullable
private
MediaMetadataProvider
mediaMetadataProvider
;
@Nullable
private
MediaMetadataProvider
mediaMetadataProvider
;
@Nullable
private
Player
player
;
@Nullable
private
Player
player
;
@Nullable
private
ErrorMessageProvider
<?
super
Exo
PlaybackException
>
errorMessageProvider
;
@Nullable
private
ErrorMessageProvider
<?
super
PlaybackException
>
errorMessageProvider
;
@Nullable
private
Pair
<
Integer
,
CharSequence
>
customError
;
@Nullable
private
Pair
<
Integer
,
CharSequence
>
customError
;
@Nullable
private
Bundle
customErrorExtras
;
@Nullable
private
Bundle
customErrorExtras
;
@Nullable
private
PlaybackPreparer
playbackPreparer
;
@Nullable
private
PlaybackPreparer
playbackPreparer
;
...
@@ -598,7 +598,7 @@ public final class MediaSessionConnector {
...
@@ -598,7 +598,7 @@ public final class MediaSessionConnector {
* @param errorMessageProvider The error message provider.
* @param errorMessageProvider The error message provider.
*/
*/
public
void
setErrorMessageProvider
(
public
void
setErrorMessageProvider
(
@Nullable
ErrorMessageProvider
<?
super
Exo
PlaybackException
>
errorMessageProvider
)
{
@Nullable
ErrorMessageProvider
<?
super
PlaybackException
>
errorMessageProvider
)
{
if
(
this
.
errorMessageProvider
!=
errorMessageProvider
)
{
if
(
this
.
errorMessageProvider
!=
errorMessageProvider
)
{
this
.
errorMessageProvider
=
errorMessageProvider
;
this
.
errorMessageProvider
=
errorMessageProvider
;
invalidateMediaSessionPlaybackState
();
invalidateMediaSessionPlaybackState
();
...
@@ -799,7 +799,7 @@ public final class MediaSessionConnector {
...
@@ -799,7 +799,7 @@ public final class MediaSessionConnector {
customActionMap
=
Collections
.
unmodifiableMap
(
currentActions
);
customActionMap
=
Collections
.
unmodifiableMap
(
currentActions
);
Bundle
extras
=
new
Bundle
();
Bundle
extras
=
new
Bundle
();
@Nullable
Exo
PlaybackException
playbackError
=
player
.
getPlayerError
();
@Nullable
PlaybackException
playbackError
=
player
.
getPlayerError
();
boolean
reportError
=
playbackError
!=
null
||
customError
!=
null
;
boolean
reportError
=
playbackError
!=
null
||
customError
!=
null
;
int
sessionPlaybackState
=
int
sessionPlaybackState
=
reportError
reportError
...
...
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