Commit 146648ce by aquilescanta Committed by bachinger

Make MediaSessionConnector depend on PlaybackException

PiperOrigin-RevId: 377529353
parent fd4cfcdd
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment