MediaDrm.ErrorCodes Class

Definition

Error codes that may be returned from MediaDrmStateException#getErrorCode() and MediaCodec.CryptoException#getErrorCode()

[Android.Runtime.Register("android/media/MediaDrm$ErrorCodes", ApiSince=31, DoNotGenerateAcw=true)]
public sealed class MediaDrm.ErrorCodes : Java.Lang.Object
[<Android.Runtime.Register("android/media/MediaDrm$ErrorCodes", ApiSince=31, DoNotGenerateAcw=true)>]
type MediaDrm.ErrorCodes = class
    inherit Object
Inheritance
MediaDrm.ErrorCodes
Attributes

Remarks

Error codes that may be returned from MediaDrmStateException#getErrorCode() and MediaCodec.CryptoException#getErrorCode()

The description of each error code includes steps that may be taken to resolve the error condition. For some errors however, a recovery action cannot be predetermined. The description of those codes refers to a general strategy for handling the error condition programmatically, which is to try the following in listed order until successful: <ol> <li> retry the operation </li> <li> if the operation is related to a session, #closeSession(byte[]) close the session, #openSession() open a new session, and retry the operation </li> <li> #close() close the MediaDrm instance and any other related components such as the MediaCodec codec and retry playback, or </li> <li> try using a different configuration of the MediaDrm plugin, such as a different #openSession(int) security level. </li> </ol>

If the problem still persists after all the aforementioned steps, please report the failure to the MediaDrm plugin vendor along with the LogMessage log messages returned by MediaDrm#getLogMessages(), and a bugreport if possible.

Java documentation for android.media.MediaDrm.ErrorCodes.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Fields

ErrorCertificateMalformed
Obsolete.

Certificate is malformed or is of the wrong type.

ErrorCertificateMissing
Obsolete.

Certificate has not been set.

ErrorCryptoLibrary
Obsolete.

An error happened within the crypto library used by the drm plugin.

ErrorFrameTooLarge
Obsolete.

The video frame being decrypted exceeds the size of the device's protected output buffers.

ErrorGenericOem
Obsolete.

Unexpected error reported by the device OEM subsystem.

ErrorGenericPlugin
Obsolete.

Unexpected internal failure in MediaDrm/MediaCrypto.

ErrorInitData
Obsolete.

The init data parameter passed to MediaDrm#getKeyRequest is empty or invalid.

ErrorInsufficientOutputProtection
Obsolete.

The output protection levels supported by the device are not sufficient to meet the requirements set by the content owner in the license policy.

ErrorInsufficientSecurity
Obsolete.

The security level of the device is not sufficient to meet the requirements set by the content owner in the license policy.

ErrorKeyExpired
Obsolete.

The key used for decryption is no longer valid due to license term expiration.

ErrorKeyNotLoaded
Obsolete.

Either the key was not loaded from the license before attempting the operation, or the key ID parameter provided by the app is incorrect.

ErrorLicenseParse
Obsolete.

The license response was empty, fields are missing or otherwise unable to be parsed or decrypted.

ErrorLicensePolicy
Obsolete.

The operation (e.

ErrorLicenseRelease
Obsolete.

Failed to generate a release request because a field in the offline license is empty or malformed.

ErrorLicenseRequestRejected
Obsolete.

The license server detected an error in the license request.

ErrorLicenseRestore
Obsolete.

Failed to restore an offline license because a field in the offline license is empty or malformed.

ErrorLicenseState
Obsolete.

Offline license is in an invalid state for the attempted operation.

ErrorLostState
Obsolete.

The session state has been invalidated.

ErrorMediaFramework
Obsolete.

Failure in the media framework.

ErrorNoKey
Obsolete.

The requested key was not found when trying to perform a decrypt operation.

ErrorProvisioningCertificate
Obsolete.

Error loading the provisioned certificate.

ErrorProvisioningConfig
Obsolete.

Required steps were not performed before provisioning was attempted.

ErrorProvisioningParse
Obsolete.

The provisioning response was empty, fields are missing or otherwise unable to be parsed.

ErrorProvisioningRequestRejected
Obsolete.

The provisioning server detected an error in the provisioning request.

ErrorProvisioningRetry
Obsolete.

Provisioning failed in a way that is likely to succeed on a subsequent attempt.

ErrorResourceBusy
Obsolete.

A required crypto resource was not able to be allocated while attempting the requested operation.

ErrorResourceContention
Obsolete.

This indicates that apps using MediaDrm sessions are temporarily exceeding the capacity of available crypto resources.

ErrorSecureStopRelease
Obsolete.

Failed to generate a secure stop request because a field in the stored license is empty or malformed.

ErrorSessionNotOpened
Obsolete.

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, the session being reclaimed by the resource manager, or a non-existent session id.

ErrorStorageRead
Obsolete.

The plugin was unable to read data from the filesystem.

ErrorStorageWrite
Obsolete.

The plugin was unable to write data to the filesystem.

ErrorUnknown
Obsolete.

ERROR_UNKNOWN is used where no other defined error code is applicable to the current failure.

ErrorUnsupportedOperation
Obsolete.

An operation was attempted that could not be supported by the crypto system of the device in its current configuration.

ErrorZeroSubsamples
Obsolete.

MediaCodec#queueSecureInputBuffer called with 0 subsamples.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to