Added in API level 21

MediaDrmStateException


class MediaDrmStateException : IllegalStateException, MediaDrmThrowable
kotlin.Any
   ↳ kotlin.Throwable
   ↳ java.lang.Exception
   ↳ java.lang.RuntimeException
   ↳ java.lang.IllegalStateException
   ↳ android.media.MediaDrm.MediaDrmStateException

Thrown when a general failure occurs during a MediaDrm operation. Extends IllegalStateException with the addition of an error code that may be useful in diagnosing the failure.

Please refer to ErrorCodes for the general error handling strategy and details about each possible return value from MediaDrmStateException.getErrorCode().

Summary

Public methods
String

Retrieve a developer-readable diagnostic information string associated with the exception.

Int

Returns error code associated with this MediaDrmStateException.

Int

Returns MediaDrm plugin vendor defined error context associated with this MediaDrmThrowable.

Int

Returns OEM or SOC specific error code associated with this MediaDrmThrowable.

Int

Returns MediaDrm plugin vendor defined error code associated with this MediaDrmThrowable.

Boolean

Returns true if the MediaDrmStateException is a transient issue, perhaps due to resource constraints, and that the operation (e.g. provisioning) may succeed on a subsequent attempt.

Public methods

getDiagnosticInfo

Added in API level 21
fun getDiagnosticInfo(): String

Retrieve a developer-readable diagnostic information string associated with the exception. Do not show this to end-users, since this string will not be localized or generally comprehensible to end-users.

Return
String This value cannot be null.

getErrorCode

Added in API level 31
fun getErrorCode(): Int

Returns error code associated with this MediaDrmStateException.

Please refer to ErrorCodes for the general error handling strategy and details about each possible return value.

Return
Int an error code defined in MediaDrm.ErrorCodes.
Value is one of the following:

getErrorContext

Added in API level 34
fun getErrorContext(): Int

Returns MediaDrm plugin vendor defined error context associated with this MediaDrmThrowable.

Please consult the MediaDrm plugin vendor for details on the error context.

Return
Int an opaque integer that would help the @MediaDrm vendor locate the source of the error if available, otherwise 0.

getOemError

Added in API level 34
fun getOemError(): Int

Returns OEM or SOC specific error code associated with this MediaDrmThrowable.

Please consult the MediaDrm plugin, chip, or device vendor for details on the error code.

Return
Int an OEM or SOC specific error code if available, otherwise 0.

getVendorError

Added in API level 34
fun getVendorError(): Int

Returns MediaDrm plugin vendor defined error code associated with this MediaDrmThrowable.

Please consult the MediaDrm plugin vendor for details on the error code.

Return
Int an error code defined by the MediaDrm plugin vendor if available, otherwise 0.

isTransient

Added in API level 31
fun isTransient(): Boolean

Returns true if the MediaDrmStateException is a transient issue, perhaps due to resource constraints, and that the operation (e.g. provisioning) may succeed on a subsequent attempt.