Add some missing nullness annotations

PiperOrigin-RevId: 292910310
This commit is contained in:
olly 2020-02-03 14:53:25 +00:00 committed by kim-vde
parent 1a0afacfe1
commit de3877237b

View File

@ -136,8 +136,8 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
*/ */
@Nullable public final DecoderInitializationException fallbackDecoderInitializationException; @Nullable public final DecoderInitializationException fallbackDecoderInitializationException;
public DecoderInitializationException(Format format, Throwable cause, public DecoderInitializationException(
boolean secureDecoderRequired, int errorCode) { Format format, @Nullable Throwable cause, boolean secureDecoderRequired, int errorCode) {
this( this(
"Decoder init failed: [" + errorCode + "], " + format, "Decoder init failed: [" + errorCode + "], " + format,
cause, cause,
@ -150,7 +150,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
public DecoderInitializationException( public DecoderInitializationException(
Format format, Format format,
Throwable cause, @Nullable Throwable cause,
boolean secureDecoderRequired, boolean secureDecoderRequired,
MediaCodecInfo mediaCodecInfo) { MediaCodecInfo mediaCodecInfo) {
this( this(
@ -165,7 +165,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
private DecoderInitializationException( private DecoderInitializationException(
String message, String message,
Throwable cause, @Nullable Throwable cause,
String mimeType, String mimeType,
boolean secureDecoderRequired, boolean secureDecoderRequired,
@Nullable MediaCodecInfo mediaCodecInfo, @Nullable MediaCodecInfo mediaCodecInfo,
@ -193,7 +193,8 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
} }
@RequiresApi(21) @RequiresApi(21)
private static String getDiagnosticInfoV21(Throwable cause) { @Nullable
private static String getDiagnosticInfoV21(@Nullable Throwable cause) {
if (cause instanceof CodecException) { if (cause instanceof CodecException) {
return ((CodecException) cause).getDiagnosticInfo(); return ((CodecException) cause).getDiagnosticInfo();
} }