mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +08:00
Remove nullness suppressions.
These were added in an internal clean-up and are better fixed than suppressed. PiperOrigin-RevId: 236118715
This commit is contained in:
parent
84e20216d7
commit
3eeb3acb3b
@ -137,11 +137,9 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
|
||||
}
|
||||
|
||||
/* package */
|
||||
// TODO(b/124903498): incompatible types in assignment.
|
||||
@SuppressWarnings("nullness:assignment.type.incompatible")
|
||||
DrmInitData(Parcel in) {
|
||||
schemeType = in.readString();
|
||||
schemeDatas = in.createTypedArray(SchemeData.CREATOR);
|
||||
schemeDatas = Util.castNonNull(in.createTypedArray(SchemeData.CREATOR));
|
||||
schemeDataCount = schemeDatas.length;
|
||||
}
|
||||
|
||||
|
@ -46,14 +46,12 @@ public final class ChapterTocFrame extends Id3Frame {
|
||||
}
|
||||
|
||||
/* package */
|
||||
// TODO(b/124903498): incompatible types in assignment.
|
||||
@SuppressWarnings("nullness:assignment.type.incompatible")
|
||||
ChapterTocFrame(Parcel in) {
|
||||
super(ID);
|
||||
this.elementId = castNonNull(in.readString());
|
||||
this.isRoot = in.readByte() != 0;
|
||||
this.isOrdered = in.readByte() != 0;
|
||||
this.children = in.createStringArray();
|
||||
this.children = castNonNull(in.createStringArray());
|
||||
int subFrameCount = in.readInt();
|
||||
subFrames = new Id3Frame[subFrameCount];
|
||||
for (int i = 0; i < subFrameCount; i++) {
|
||||
|
@ -17,6 +17,7 @@ package com.google.android.exoplayer2.metadata.id3;
|
||||
|
||||
import android.os.Parcel;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
import java.util.Arrays;
|
||||
|
||||
/** MPEG location lookup table frame. */
|
||||
@ -45,15 +46,13 @@ public final class MlltFrame extends Id3Frame {
|
||||
}
|
||||
|
||||
/* package */
|
||||
// TODO(b/124903498): incompatible types in assignment.
|
||||
@SuppressWarnings("nullness:assignment.type.incompatible")
|
||||
MlltFrame(Parcel in) {
|
||||
super(ID);
|
||||
this.mpegFramesBetweenReference = in.readInt();
|
||||
this.bytesBetweenReference = in.readInt();
|
||||
this.millisecondsBetweenReference = in.readInt();
|
||||
this.bytesDeviations = in.createIntArray();
|
||||
this.millisecondsDeviations = in.createIntArray();
|
||||
this.bytesDeviations = Util.castNonNull(in.createIntArray());
|
||||
this.millisecondsDeviations = Util.castNonNull(in.createIntArray());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -363,13 +363,11 @@ public final class DownloadHelper {
|
||||
* Looper}, in which case it will be called on the application's main thread.
|
||||
* @throws IllegalStateException If the download helper has already been prepared.
|
||||
*/
|
||||
// TODO(b/124903498): incompatible types in argument.
|
||||
@SuppressWarnings("nullness:argument.type.incompatible")
|
||||
public void prepare(Callback callback) {
|
||||
Assertions.checkState(this.callback == null);
|
||||
this.callback = callback;
|
||||
callbackHandler =
|
||||
new Handler(Looper.myLooper() != null ? Looper.myLooper() : Looper.getMainLooper());
|
||||
Looper myLooper = Looper.myLooper();
|
||||
callbackHandler = new Handler(myLooper != null ? myLooper : Looper.getMainLooper());
|
||||
if (mediaSource != null) {
|
||||
mediaPreparer = new MediaPreparer(mediaSource, /* downloadHelper= */ this);
|
||||
} else {
|
||||
|
@ -889,8 +889,6 @@ public class DefaultTrackSelector extends MappingTrackSelector {
|
||||
}
|
||||
|
||||
/* package */
|
||||
// TODO(b/124903498): incompatible types in assignment.
|
||||
@SuppressWarnings("nullness:assignment.type.incompatible")
|
||||
Parameters(Parcel in) {
|
||||
super(in);
|
||||
// Video
|
||||
@ -917,7 +915,7 @@ public class DefaultTrackSelector extends MappingTrackSelector {
|
||||
this.tunnelingAudioSessionId = in.readInt();
|
||||
// Overrides
|
||||
this.selectionOverrides = readSelectionOverrides(in);
|
||||
this.rendererDisabledFlags = in.readSparseBooleanArray();
|
||||
this.rendererDisabledFlags = Util.castNonNull(in.readSparseBooleanArray());
|
||||
// Deprecated fields.
|
||||
this.allowMixedMimeAdaptiveness = allowVideoMixedMimeTypeAdaptiveness;
|
||||
this.allowNonSeamlessAdaptiveness = allowVideoNonSeamlessAdaptiveness;
|
||||
|
@ -162,8 +162,7 @@ public final class Util {
|
||||
* @param intent The intent to pass to the called method.
|
||||
* @return The result of the called method.
|
||||
*/
|
||||
// TODO(b/124903498): incompatible types in return.
|
||||
@SuppressWarnings("nullness:return.type.incompatible")
|
||||
@Nullable
|
||||
public static ComponentName startForegroundService(Context context, Intent intent) {
|
||||
if (Util.SDK_INT >= 26) {
|
||||
return context.startForegroundService(intent);
|
||||
|
@ -1265,8 +1265,6 @@ public class PlayerNotificationManager {
|
||||
|
||||
private class NotificationBroadcastReceiver extends BroadcastReceiver {
|
||||
|
||||
// TODO(b/124903498): incompatible types in argument.
|
||||
@SuppressWarnings("nullness:argument.type.incompatible")
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
Player player = PlayerNotificationManager.this.player;
|
||||
@ -1299,7 +1297,9 @@ public class PlayerNotificationManager {
|
||||
controlDispatcher.dispatchStop(player, /* reset= */ true);
|
||||
} else if (ACTION_DISMISS.equals(action)) {
|
||||
stopNotification(/* dismissedByUser= */ true);
|
||||
} else if (customActionReceiver != null && customActions.containsKey(action)) {
|
||||
} else if (action != null
|
||||
&& customActionReceiver != null
|
||||
&& customActions.containsKey(action)) {
|
||||
customActionReceiver.onCustomAction(player, action, intent);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user