Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -14672,6 +14672,7 @@ package android.media { public static final class MediaCodec.CryptoException extends java.lang.RuntimeException { ctor public MediaCodec.CryptoException(int, java.lang.String); method public int getErrorCode(); field public static final int ERROR_INSUFFICIENT_OUTPUT_PROTECTION = 4; // 0x4 field public static final int ERROR_KEY_EXPIRED = 2; // 0x2 field public static final int ERROR_NO_KEY = 1; // 0x1 field public static final int ERROR_RESOURCE_BUSY = 3; // 0x3 media/java/android/media/MediaCodec.java +7 −0 Original line number Diff line number Diff line Loading @@ -736,6 +736,13 @@ final public class MediaCodec { */ public static final int ERROR_RESOURCE_BUSY = 3; /** * This indicates that the output protection levels supported by the * device are not sufficient to meet the requirements set by the * content owner in the license policy. */ public static final int ERROR_INSUFFICIENT_OUTPUT_PROTECTION = 4; /** * Retrieve the error code associated with a CryptoException */ Loading media/jni/android_media_MediaCodec.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ static struct CryptoErrorCodes { jint cryptoErrorNoKey; jint cryptoErrorKeyExpired; jint cryptoErrorResourceBusy; jint cryptoErrorInsufficientOutputProtection; } gCryptoErrorCodes; static struct CodecActionCodes { Loading Loading @@ -756,6 +757,9 @@ static void throwCryptoException(JNIEnv *env, status_t err, const char *msg) { case ERROR_DRM_RESOURCE_BUSY: err = gCryptoErrorCodes.cryptoErrorResourceBusy; break; case ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION: err = gCryptoErrorCodes.cryptoErrorInsufficientOutputProtection; break; default: /* Other negative DRM error codes go out as is. */ break; } Loading Loading @@ -1434,6 +1438,11 @@ static void android_media_MediaCodec_native_init(JNIEnv *env) { gCryptoErrorCodes.cryptoErrorResourceBusy = env->GetStaticIntField(clazz.get(), field); field = env->GetStaticFieldID(clazz.get(), "ERROR_INSUFFICIENT_OUTPUT_PROTECTION", "I"); CHECK(field != NULL); gCryptoErrorCodes.cryptoErrorInsufficientOutputProtection = env->GetStaticIntField(clazz.get(), field); clazz.reset(env->FindClass("android/media/MediaCodec$CodecException")); CHECK(clazz.get() != NULL); field = env->GetStaticFieldID(clazz.get(), "ACTION_TRANSIENT", "I"); Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -14672,6 +14672,7 @@ package android.media { public static final class MediaCodec.CryptoException extends java.lang.RuntimeException { ctor public MediaCodec.CryptoException(int, java.lang.String); method public int getErrorCode(); field public static final int ERROR_INSUFFICIENT_OUTPUT_PROTECTION = 4; // 0x4 field public static final int ERROR_KEY_EXPIRED = 2; // 0x2 field public static final int ERROR_NO_KEY = 1; // 0x1 field public static final int ERROR_RESOURCE_BUSY = 3; // 0x3
media/java/android/media/MediaCodec.java +7 −0 Original line number Diff line number Diff line Loading @@ -736,6 +736,13 @@ final public class MediaCodec { */ public static final int ERROR_RESOURCE_BUSY = 3; /** * This indicates that the output protection levels supported by the * device are not sufficient to meet the requirements set by the * content owner in the license policy. */ public static final int ERROR_INSUFFICIENT_OUTPUT_PROTECTION = 4; /** * Retrieve the error code associated with a CryptoException */ Loading
media/jni/android_media_MediaCodec.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ static struct CryptoErrorCodes { jint cryptoErrorNoKey; jint cryptoErrorKeyExpired; jint cryptoErrorResourceBusy; jint cryptoErrorInsufficientOutputProtection; } gCryptoErrorCodes; static struct CodecActionCodes { Loading Loading @@ -756,6 +757,9 @@ static void throwCryptoException(JNIEnv *env, status_t err, const char *msg) { case ERROR_DRM_RESOURCE_BUSY: err = gCryptoErrorCodes.cryptoErrorResourceBusy; break; case ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION: err = gCryptoErrorCodes.cryptoErrorInsufficientOutputProtection; break; default: /* Other negative DRM error codes go out as is. */ break; } Loading Loading @@ -1434,6 +1438,11 @@ static void android_media_MediaCodec_native_init(JNIEnv *env) { gCryptoErrorCodes.cryptoErrorResourceBusy = env->GetStaticIntField(clazz.get(), field); field = env->GetStaticFieldID(clazz.get(), "ERROR_INSUFFICIENT_OUTPUT_PROTECTION", "I"); CHECK(field != NULL); gCryptoErrorCodes.cryptoErrorInsufficientOutputProtection = env->GetStaticIntField(clazz.get(), field); clazz.reset(env->FindClass("android/media/MediaCodec$CodecException")); CHECK(clazz.get() != NULL); field = env->GetStaticFieldID(clazz.get(), "ACTION_TRANSIENT", "I"); Loading