Skip to content

Commit

Permalink
Re-use local variable in replacement of unnecessary indirections
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 266772364
  • Loading branch information
AquilesCanta authored and tonihei committed Sep 5, 2019
1 parent 82d10e2 commit 494b6f6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ protected int supportsFormat(
if (!MimeTypes.isVideo(mimeType)) {
return FORMAT_UNSUPPORTED_TYPE;
}
DrmInitData drmInitData = format.drmInitData;
@Nullable DrmInitData drmInitData = format.drmInitData;
// Assume encrypted content requires secure decoders.
boolean requiresSecureDecryption = drmInitData != null;
List<MediaCodecInfo> decoderInfos =
Expand All @@ -341,10 +341,10 @@ protected int supportsFormat(
return FORMAT_UNSUPPORTED_SUBTYPE;
}
boolean supportsFormatDrm =
format.drmInitData == null
drmInitData == null
|| FrameworkMediaCrypto.class.equals(format.exoMediaCryptoType)
|| (format.exoMediaCryptoType == null
&& supportsFormatDrm(drmSessionManager, format.drmInitData));
&& supportsFormatDrm(drmSessionManager, drmInitData));
if (!supportsFormatDrm) {
return FORMAT_UNSUPPORTED_DRM;
}
Expand Down

0 comments on commit 494b6f6

Please sign in to comment.