SessionException
class SessionException : RuntimeException, MediaDrmThrowable
kotlin.Any | ||||
↳ | kotlin.Throwable | |||
↳ | java.lang.Exception | |||
↳ | java.lang.RuntimeException | |||
↳ | android.media.MediaDrm.SessionException |
SessionException
is a misnomer because it may occur in methods without a session context.
A SessionException
is most likely to be thrown when an operation failed in a way that is likely to succeed on a subsequent attempt; call isTransient()
to determine whether the app should retry the failing operation.
Summary
Constants | |
---|---|
static Int |
This indicates that apps using MediaDrm sessions are temporarily exceeding the capacity of available crypto resources. |
static Int |
The SessionException has an unknown error code. |
Public constructors | |
---|---|
SessionException(errorCode: Int, detailMessage: String?) |
Public methods | |
---|---|
Int |
Retrieve the error code associated with the SessionException |
Int | |
Int | |
Int | |
Boolean |
Returns true if the |
Constants
ERROR_RESOURCE_CONTENTION
static valERROR_RESOURCE_CONTENTION: Int
Deprecated: Please use isTransient()
instead of comparing the return value of getErrorCode()
against SessionException#ERROR_RESOURCE_CONTENTION
.
This indicates that apps using MediaDrm sessions are temporarily exceeding the capacity of available crypto resources. The app should retry the operation later.
Value: 1
ERROR_UNKNOWN
static valERROR_UNKNOWN: Int
Deprecated: Unused.
The SessionException has an unknown error code.
Value: 0
Public constructors
SessionException
SessionException(
errorCode: Int,
detailMessage: String?)
Parameters | |
---|---|
detailMessage |
String?: This value may be null . |
Public methods
getErrorCode
fungetErrorCode(): Int
Deprecated: Please use isTransient()
instead of comparing the return value of getErrorCode()
against SessionException#ERROR_RESOURCE_CONTENTION
.
Retrieve the error code associated with the SessionException
Return | |
---|---|
Int |
Value is android.media.MediaDrm.SessionException#ERROR_RESOURCE_CONTENTION |
getErrorContext
fun getErrorContext(): Int
Return | |
---|---|
Int |
an opaque integer that would help the @MediaDrm vendor locate the source of the error if available, otherwise 0. |
getOemError
fun getOemError(): Int
Return | |
---|---|
Int |
an OEM or SOC specific error code if available, otherwise 0. |
getVendorError
fun getVendorError(): Int
Return | |
---|---|
Int |
an error code defined by the MediaDrm plugin vendor if available, otherwise 0. |
isTransient
fun isTransient(): Boolean
Returns true if the SessionException
is a transient issue, perhaps due to resource constraints, and that the operation (e.g. provisioning, generating requests) may succeed on a subsequent attempt.