mirror of
https://github.com/samsonjs/media.git
synced 2026-04-17 13:15:47 +00:00
Make MediaSessionConnector depend on PlaybackException
PiperOrigin-RevId: 377529353
This commit is contained in:
parent
fd4cfcdd67
commit
146648ce22
1 changed files with 4 additions and 4 deletions
|
|
@ -44,9 +44,9 @@ import androidx.annotation.Nullable;
|
|||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.ControlDispatcher;
|
||||
import com.google.android.exoplayer2.DefaultControlDispatcher;
|
||||
import com.google.android.exoplayer2.ExoPlaybackException;
|
||||
import com.google.android.exoplayer2.ExoPlayerLibraryInfo;
|
||||
import com.google.android.exoplayer2.MediaItem;
|
||||
import com.google.android.exoplayer2.PlaybackException;
|
||||
import com.google.android.exoplayer2.Player;
|
||||
import com.google.android.exoplayer2.Timeline;
|
||||
import com.google.android.exoplayer2.util.Assertions;
|
||||
|
|
@ -475,7 +475,7 @@ public final class MediaSessionConnector {
|
|||
private Map<String, CustomActionProvider> customActionMap;
|
||||
@Nullable private MediaMetadataProvider mediaMetadataProvider;
|
||||
@Nullable private Player player;
|
||||
@Nullable private ErrorMessageProvider<? super ExoPlaybackException> errorMessageProvider;
|
||||
@Nullable private ErrorMessageProvider<? super PlaybackException> errorMessageProvider;
|
||||
@Nullable private Pair<Integer, CharSequence> customError;
|
||||
@Nullable private Bundle customErrorExtras;
|
||||
@Nullable private PlaybackPreparer playbackPreparer;
|
||||
|
|
@ -598,7 +598,7 @@ public final class MediaSessionConnector {
|
|||
* @param errorMessageProvider The error message provider.
|
||||
*/
|
||||
public void setErrorMessageProvider(
|
||||
@Nullable ErrorMessageProvider<? super ExoPlaybackException> errorMessageProvider) {
|
||||
@Nullable ErrorMessageProvider<? super PlaybackException> errorMessageProvider) {
|
||||
if (this.errorMessageProvider != errorMessageProvider) {
|
||||
this.errorMessageProvider = errorMessageProvider;
|
||||
invalidateMediaSessionPlaybackState();
|
||||
|
|
@ -799,7 +799,7 @@ public final class MediaSessionConnector {
|
|||
customActionMap = Collections.unmodifiableMap(currentActions);
|
||||
|
||||
Bundle extras = new Bundle();
|
||||
@Nullable ExoPlaybackException playbackError = player.getPlayerError();
|
||||
@Nullable PlaybackException playbackError = player.getPlayerError();
|
||||
boolean reportError = playbackError != null || customError != null;
|
||||
int sessionPlaybackState =
|
||||
reportError
|
||||
|
|
|
|||
Loading…
Reference in a new issue