Skip to content

Most visited

Recently visited

navigation

MediaDrm.KeyStatus

public static final class MediaDrm.KeyStatus
extends Object

java.lang.Object
   ↳ android.media.MediaDrm.KeyStatus


Defines the status of a key. A KeyStatus for each key in a session is provided to the onKeyStatusChange(MediaDrm, byte[], List, boolean) listener.

Summary

Constants

int STATUS_EXPIRED

The key is no longer usable to decrypt media data because its expiration time has passed.

int STATUS_INTERNAL_ERROR

The key is not currently usable to decrypt media data because of an internal error in processing unrelated to input parameters.

int STATUS_OUTPUT_NOT_ALLOWED

The key is not currently usable to decrypt media data because its output requirements cannot currently be met.

int STATUS_PENDING

The status of the key is not yet known and is being determined.

int STATUS_USABLE

The key is currently usable to decrypt media data

Public methods

byte[] getKeyId()

Returns the id for the key

int getStatusCode()

Returns the status code for the key

Inherited methods

From class java.lang.Object

Constants

STATUS_EXPIRED

added in API level 23
int STATUS_EXPIRED

The key is no longer usable to decrypt media data because its expiration time has passed.

Constant Value: 1 (0x00000001)

STATUS_INTERNAL_ERROR

added in API level 23
int STATUS_INTERNAL_ERROR

The key is not currently usable to decrypt media data because of an internal error in processing unrelated to input parameters. This error is not actionable by an app.

Constant Value: 4 (0x00000004)

STATUS_OUTPUT_NOT_ALLOWED

added in API level 23
int STATUS_OUTPUT_NOT_ALLOWED

The key is not currently usable to decrypt media data because its output requirements cannot currently be met.

Constant Value: 2 (0x00000002)

STATUS_PENDING

added in API level 23
int STATUS_PENDING

The status of the key is not yet known and is being determined. The status will be updated with the actual status when it has been determined.

Constant Value: 3 (0x00000003)

STATUS_USABLE

added in API level 23
int STATUS_USABLE

The key is currently usable to decrypt media data

Constant Value: 0 (0x00000000)

Public methods

getKeyId

added in API level 23
byte[] getKeyId ()

Returns the id for the key

Returns
byte[]

This value will never be null.

getStatusCode

added in API level 23
int getStatusCode ()

Returns the status code for the key

Returns
int one of STATUS_USABLE, STATUS_EXPIRED, STATUS_OUTPUT_NOT_ALLOWED, STATUS_PENDING or STATUS_INTERNAL_ERROR.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.