Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -25456,6 +25456,7 @@ package android.media { public static final class MediaCodec.CryptoInfo { ctor public MediaCodec.CryptoInfo(); method @NonNull public android.media.MediaCodec.CryptoInfo.Pattern getPattern(); method public void set(int, @NonNull int[], @NonNull int[], @NonNull byte[], @NonNull byte[], int); method public void setPattern(android.media.MediaCodec.CryptoInfo.Pattern); field public byte[] iv; media/java/android/media/MediaCodec.java +17 −9 Original line number Diff line number Diff line Loading @@ -2711,12 +2711,12 @@ final public class MediaCodec { } }; private final Pattern zeroPattern = new Pattern(0, 0); private static final Pattern ZERO_PATTERN = new Pattern(0, 0); /** * The pattern applicable to the protected data in each subsample. */ private Pattern pattern; private Pattern mPattern = ZERO_PATTERN; /** * Set the subsample count, clear/encrypted sizes, key, IV and mode fields of Loading @@ -2735,22 +2735,30 @@ final public class MediaCodec { key = newKey; iv = newIV; mode = newMode; pattern = zeroPattern; mPattern = ZERO_PATTERN; } /** * Returns the {@link Pattern encryption pattern}. */ public @NonNull Pattern getPattern() { return new Pattern(mPattern.getEncryptBlocks(), mPattern.getSkipBlocks()); } /** * Set the encryption pattern on a {@link MediaCodec.CryptoInfo} instance. * See {@link MediaCodec.CryptoInfo.Pattern}. * See {@link Pattern}. */ public void setPattern(Pattern newPattern) { if (newPattern == null) { newPattern = zeroPattern; newPattern = ZERO_PATTERN; } pattern = newPattern; setPattern(newPattern.getEncryptBlocks(), newPattern.getSkipBlocks()); } // Accessed from android_media_MediaExtractor.cpp. private void setPattern(int blocksToEncrypt, int blocksToSkip) { pattern = new Pattern(blocksToEncrypt, blocksToSkip); mPattern = new Pattern(blocksToEncrypt, blocksToSkip); } @Override Loading @@ -2772,9 +2780,9 @@ final public class MediaCodec { builder.append(", encrypted "); builder.append(Arrays.toString(numBytesOfEncryptedData)); builder.append(", pattern (encrypt: "); builder.append(pattern.mEncryptBlocks); builder.append(mPattern.mEncryptBlocks); builder.append(", skip: "); builder.append(pattern.mSkipBlocks); builder.append(mPattern.mSkipBlocks); builder.append(")"); return builder.toString(); } Loading media/jni/android_media_MediaCodec.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2662,7 +2662,7 @@ static void android_media_MediaCodec_native_init(JNIEnv *env, jclass) { gFields.cryptoInfoModeID = env->GetFieldID(clazz.get(), "mode", "I"); CHECK(gFields.cryptoInfoModeID != NULL); gFields.cryptoInfoPatternID = env->GetFieldID(clazz.get(), "pattern", gFields.cryptoInfoPatternID = env->GetFieldID(clazz.get(), "mPattern", "Landroid/media/MediaCodec$CryptoInfo$Pattern;"); CHECK(gFields.cryptoInfoPatternID != NULL); Loading non-updatable-api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -25438,6 +25438,7 @@ package android.media { public static final class MediaCodec.CryptoInfo { ctor public MediaCodec.CryptoInfo(); method @NonNull public android.media.MediaCodec.CryptoInfo.Pattern getPattern(); method public void set(int, @NonNull int[], @NonNull int[], @NonNull byte[], @NonNull byte[], int); method public void setPattern(android.media.MediaCodec.CryptoInfo.Pattern); field public byte[] iv; Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -25456,6 +25456,7 @@ package android.media { public static final class MediaCodec.CryptoInfo { ctor public MediaCodec.CryptoInfo(); method @NonNull public android.media.MediaCodec.CryptoInfo.Pattern getPattern(); method public void set(int, @NonNull int[], @NonNull int[], @NonNull byte[], @NonNull byte[], int); method public void setPattern(android.media.MediaCodec.CryptoInfo.Pattern); field public byte[] iv;
media/java/android/media/MediaCodec.java +17 −9 Original line number Diff line number Diff line Loading @@ -2711,12 +2711,12 @@ final public class MediaCodec { } }; private final Pattern zeroPattern = new Pattern(0, 0); private static final Pattern ZERO_PATTERN = new Pattern(0, 0); /** * The pattern applicable to the protected data in each subsample. */ private Pattern pattern; private Pattern mPattern = ZERO_PATTERN; /** * Set the subsample count, clear/encrypted sizes, key, IV and mode fields of Loading @@ -2735,22 +2735,30 @@ final public class MediaCodec { key = newKey; iv = newIV; mode = newMode; pattern = zeroPattern; mPattern = ZERO_PATTERN; } /** * Returns the {@link Pattern encryption pattern}. */ public @NonNull Pattern getPattern() { return new Pattern(mPattern.getEncryptBlocks(), mPattern.getSkipBlocks()); } /** * Set the encryption pattern on a {@link MediaCodec.CryptoInfo} instance. * See {@link MediaCodec.CryptoInfo.Pattern}. * See {@link Pattern}. */ public void setPattern(Pattern newPattern) { if (newPattern == null) { newPattern = zeroPattern; newPattern = ZERO_PATTERN; } pattern = newPattern; setPattern(newPattern.getEncryptBlocks(), newPattern.getSkipBlocks()); } // Accessed from android_media_MediaExtractor.cpp. private void setPattern(int blocksToEncrypt, int blocksToSkip) { pattern = new Pattern(blocksToEncrypt, blocksToSkip); mPattern = new Pattern(blocksToEncrypt, blocksToSkip); } @Override Loading @@ -2772,9 +2780,9 @@ final public class MediaCodec { builder.append(", encrypted "); builder.append(Arrays.toString(numBytesOfEncryptedData)); builder.append(", pattern (encrypt: "); builder.append(pattern.mEncryptBlocks); builder.append(mPattern.mEncryptBlocks); builder.append(", skip: "); builder.append(pattern.mSkipBlocks); builder.append(mPattern.mSkipBlocks); builder.append(")"); return builder.toString(); } Loading
media/jni/android_media_MediaCodec.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2662,7 +2662,7 @@ static void android_media_MediaCodec_native_init(JNIEnv *env, jclass) { gFields.cryptoInfoModeID = env->GetFieldID(clazz.get(), "mode", "I"); CHECK(gFields.cryptoInfoModeID != NULL); gFields.cryptoInfoPatternID = env->GetFieldID(clazz.get(), "pattern", gFields.cryptoInfoPatternID = env->GetFieldID(clazz.get(), "mPattern", "Landroid/media/MediaCodec$CryptoInfo$Pattern;"); CHECK(gFields.cryptoInfoPatternID != NULL); Loading
non-updatable-api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -25438,6 +25438,7 @@ package android.media { public static final class MediaCodec.CryptoInfo { ctor public MediaCodec.CryptoInfo(); method @NonNull public android.media.MediaCodec.CryptoInfo.Pattern getPattern(); method public void set(int, @NonNull int[], @NonNull int[], @NonNull byte[], @NonNull byte[], int); method public void setPattern(android.media.MediaCodec.CryptoInfo.Pattern); field public byte[] iv;