Report specific exception type on decrypt with invalid session

bug: 22235465
Change-Id: Ic1e1a86529d4f2246b9768799aacde5cd1070d04
This commit is contained in:
Jeff Tinker
2015-07-01 17:35:18 -07:00
parent a6fb1e70ff
commit 96a2a957e4
4 changed files with 20 additions and 0 deletions

View File

@@ -2029,12 +2029,21 @@ final public class MediaCodec {
*/
public static final int ERROR_INSUFFICIENT_OUTPUT_PROTECTION = 4;
/**
* This indicates that decryption was attempted on a session that is
* not opened, which could be due to a failure to open the session,
* closing the session prematurely, or the session being reclaimed
* by the resource manager.
*/
public static final int ERROR_SESSION_NOT_OPENED = 5;
/** @hide */
@IntDef({
ERROR_NO_KEY,
ERROR_KEY_EXPIRED,
ERROR_RESOURCE_BUSY,
ERROR_INSUFFICIENT_OUTPUT_PROTECTION,
ERROR_SESSION_NOT_OPENED,
})
@Retention(RetentionPolicy.SOURCE)
public @interface CryptoErrorCode {}