Remove nullness warnings in session module
PiperOrigin-RevId: 527666416
This commit is contained in:
parent
5c02210305
commit
9b3a5df5ef
@ -814,8 +814,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Converts a {@link PlaybackStateCompat} to {@link Player.State} */
|
/** Converts a {@link PlaybackStateCompat} to {@link Player.State} */
|
||||||
@Player.State
|
public static @Player.State int convertToPlaybackState(
|
||||||
public static int convertToPlaybackState(
|
|
||||||
@Nullable PlaybackStateCompat playbackStateCompat,
|
@Nullable PlaybackStateCompat playbackStateCompat,
|
||||||
@Nullable MediaMetadataCompat currentMediaMetadata,
|
@Nullable MediaMetadataCompat currentMediaMetadata,
|
||||||
long timeDiffMs) {
|
long timeDiffMs) {
|
||||||
@ -960,8 +959,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Converts {@link PlaybackStateCompat.RepeatMode} to {@link Player.RepeatMode}. */
|
/** Converts {@link PlaybackStateCompat.RepeatMode} to {@link Player.RepeatMode}. */
|
||||||
@Player.RepeatMode
|
public static @Player.RepeatMode int convertToRepeatMode(
|
||||||
public static int convertToRepeatMode(
|
|
||||||
@PlaybackStateCompat.RepeatMode int playbackStateCompatRepeatMode) {
|
@PlaybackStateCompat.RepeatMode int playbackStateCompatRepeatMode) {
|
||||||
switch (playbackStateCompatRepeatMode) {
|
switch (playbackStateCompatRepeatMode) {
|
||||||
case PlaybackStateCompat.REPEAT_MODE_INVALID:
|
case PlaybackStateCompat.REPEAT_MODE_INVALID:
|
||||||
|
@ -119,13 +119,13 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue;
|
|||||||
public static class Builder {
|
public static class Builder {
|
||||||
|
|
||||||
@Nullable private PlaybackException playerError;
|
@Nullable private PlaybackException playerError;
|
||||||
@Player.MediaItemTransitionReason private int mediaItemTransitionReason;
|
private @Player.MediaItemTransitionReason int mediaItemTransitionReason;
|
||||||
private SessionPositionInfo sessionPositionInfo;
|
private SessionPositionInfo sessionPositionInfo;
|
||||||
private PositionInfo oldPositionInfo;
|
private PositionInfo oldPositionInfo;
|
||||||
private PositionInfo newPositionInfo;
|
private PositionInfo newPositionInfo;
|
||||||
@Player.DiscontinuityReason private int discontinuityReason;
|
private @Player.DiscontinuityReason int discontinuityReason;
|
||||||
private PlaybackParameters playbackParameters;
|
private PlaybackParameters playbackParameters;
|
||||||
@Player.RepeatMode private int repeatMode;
|
private @Player.RepeatMode int repeatMode;
|
||||||
private boolean shuffleModeEnabled;
|
private boolean shuffleModeEnabled;
|
||||||
private Timeline timeline;
|
private Timeline timeline;
|
||||||
private VideoSize videoSize;
|
private VideoSize videoSize;
|
||||||
@ -137,11 +137,11 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue;
|
|||||||
private int deviceVolume;
|
private int deviceVolume;
|
||||||
private boolean deviceMuted;
|
private boolean deviceMuted;
|
||||||
private boolean playWhenReady;
|
private boolean playWhenReady;
|
||||||
@Player.PlayWhenReadyChangeReason private int playWhenReadyChangedReason;
|
private @Player.PlayWhenReadyChangeReason int playWhenReadyChangedReason;
|
||||||
private boolean isPlaying;
|
private boolean isPlaying;
|
||||||
private boolean isLoading;
|
private boolean isLoading;
|
||||||
@PlaybackSuppressionReason private int playbackSuppressionReason;
|
private @PlaybackSuppressionReason int playbackSuppressionReason;
|
||||||
@State private int playbackState;
|
private @State int playbackState;
|
||||||
private MediaMetadata mediaMetadata;
|
private MediaMetadata mediaMetadata;
|
||||||
private long seekBackIncrementMs;
|
private long seekBackIncrementMs;
|
||||||
private long seekForwardIncrementMs;
|
private long seekForwardIncrementMs;
|
||||||
@ -449,7 +449,7 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue;
|
|||||||
|
|
||||||
@Nullable public final PlaybackException playerError;
|
@Nullable public final PlaybackException playerError;
|
||||||
|
|
||||||
@Player.MediaItemTransitionReason public final int mediaItemTransitionReason;
|
public final @Player.MediaItemTransitionReason int mediaItemTransitionReason;
|
||||||
|
|
||||||
public final SessionPositionInfo sessionPositionInfo;
|
public final SessionPositionInfo sessionPositionInfo;
|
||||||
|
|
||||||
@ -457,11 +457,11 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue;
|
|||||||
|
|
||||||
public final PositionInfo newPositionInfo;
|
public final PositionInfo newPositionInfo;
|
||||||
|
|
||||||
@Player.DiscontinuityReason public final int discontinuityReason;
|
public final @Player.DiscontinuityReason int discontinuityReason;
|
||||||
|
|
||||||
public final PlaybackParameters playbackParameters;
|
public final PlaybackParameters playbackParameters;
|
||||||
|
|
||||||
@Player.RepeatMode public final int repeatMode;
|
public final @Player.RepeatMode int repeatMode;
|
||||||
|
|
||||||
public final boolean shuffleModeEnabled;
|
public final boolean shuffleModeEnabled;
|
||||||
|
|
||||||
@ -491,9 +491,9 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue;
|
|||||||
|
|
||||||
public final boolean isLoading;
|
public final boolean isLoading;
|
||||||
|
|
||||||
@Player.PlaybackSuppressionReason public final int playbackSuppressionReason;
|
public final @Player.PlaybackSuppressionReason int playbackSuppressionReason;
|
||||||
|
|
||||||
@Player.State public final int playbackState;
|
public final @Player.State int playbackState;
|
||||||
|
|
||||||
public final MediaMetadata mediaMetadata;
|
public final MediaMetadata mediaMetadata;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ import com.google.common.base.Objects;
|
|||||||
|
|
||||||
private final int uid;
|
private final int uid;
|
||||||
|
|
||||||
@SessionToken.TokenType private final int type;
|
private final @SessionToken.TokenType int type;
|
||||||
|
|
||||||
private final int libraryVersion;
|
private final int libraryVersion;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user