Added in API level 23

KeyStatus


class KeyStatus
kotlin.Any
   ↳ android.media.MediaDrm.KeyStatus

Defines the status of a key. A KeyStatus for each key in a session is provided to the OnKeyStatusChangeListener#onKeyStatusChange listener.

Summary

Constants
static Int

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

static Int

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

static Int

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

static Int

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

static Int

The key is currently usable to decrypt media data

static Int

The key is not yet usable to decrypt media because the start time is in the future.

Public methods
ByteArray

Returns the id for the key

Int

Returns the status code for the key

Constants

STATUS_EXPIRED

Added in API level 23
static val STATUS_EXPIRED: Int

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

Value: 1

STATUS_INTERNAL_ERROR

Added in API level 23
static val STATUS_INTERNAL_ERROR: Int

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.

Value: 4

STATUS_OUTPUT_NOT_ALLOWED

Added in API level 23
static val STATUS_OUTPUT_NOT_ALLOWED: Int

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

Value: 2

STATUS_PENDING

Added in API level 23
static val STATUS_PENDING: Int

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.

Value: 3

STATUS_USABLE

Added in API level 23
static val STATUS_USABLE: Int

The key is currently usable to decrypt media data

Value: 0

STATUS_USABLE_IN_FUTURE

Added in API level 29
static val STATUS_USABLE_IN_FUTURE: Int

The key is not yet usable to decrypt media because the start time is in the future. The key will become usable when its start time is reached.

Value: 5

Public methods

getKeyId

Added in API level 23
fun getKeyId(): ByteArray

Returns the id for the key

Return
ByteArray This value cannot be null.