Skip to content

Commit 87459db

Browse files
theandi666Android (Google) Code Review
authored andcommitted
Merge "MediaCrypto's constructor can throw RuntimeException."
2 parents d95ce04 + 2952c5d commit 87459db

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

api/current.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10996,7 +10996,7 @@ package android.media {
1099610996
}
1099710997

1099810998
public final class MediaCrypto {
10999-
ctor public MediaCrypto(byte[], byte[]);
10999+
ctor public MediaCrypto(byte[], byte[]) throws java.lang.RuntimeException;
1100011000
method public static final boolean isCryptoSchemeSupported(byte[]);
1100111001
method public final void release();
1100211002
method public final boolean requiresSecureDecoderComponent(java.lang.String);

media/java/android/media/MediaCrypto.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public final class MediaCrypto {
3737
* @param uuid The UUID of the crypto scheme.
3838
* @param initData Opaque initialization data specific to the crypto scheme.
3939
*/
40-
public MediaCrypto(byte[] uuid, byte[] initData) {
40+
public MediaCrypto(byte[] uuid, byte[] initData) throws RuntimeException {
4141
native_setup(uuid, initData);
4242
}
4343

media/jni/android_media_MediaCrypto.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static void android_media_MediaCrypto_native_setup(
210210
if (err != OK) {
211211
jniThrowException(
212212
env,
213-
"java/io/IOException",
213+
"java/lang/RuntimeException",
214214
"Failed to instantiate crypto object.");
215215
return;
216216
}

0 commit comments

Comments
 (0)