# MediaDrm.MetricsConstants

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# MetricsConstants

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/media/MediaDrm.MetricsConstants "View this page in Java")  

```
class MetricsConstants
```

|---|------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                     ||
| ↳ | [android.media.MediaDrm.MetricsConstants](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#) |

Definitions for the metrics that are reported via the[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.

## Summary

|                                                                                                                                                                                                                                                                                                                                                            Constants                                                                                                                                                                                                                                                                                                                                                            ||
|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CLOSE_SESSION_ERROR_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#CLOSE_SESSION_ERROR_COUNT:kotlin.String) Key to extract the number of failed[closeSession](https://developer.android.com/reference/kotlin/android/media/MediaDrm#closeSession(kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.                                                                               |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CLOSE_SESSION_ERROR_LIST](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#CLOSE_SESSION_ERROR_LIST:kotlin.String) Key to extract the list of error codes that were returned from[closeSession](https://developer.android.com/reference/kotlin/android/media/MediaDrm#closeSession(kotlin.ByteArray))calls.                                                                                                                                                                                                                                                                                      |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CLOSE_SESSION_OK_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#CLOSE_SESSION_OK_COUNT:kotlin.String) Key to extract the number of successful[closeSession](https://developer.android.com/reference/kotlin/android/media/MediaDrm#closeSession(kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.                                                                                 |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EVENT_KEY_EXPIRED_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#EVENT_KEY_EXPIRED_COUNT:kotlin.String) Key to extract the count of[OnEventListener.onEvent](https://developer.android.com/reference/kotlin/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))calls of type KEY_EXPIRED occurred.                                                                                                                                                                                              |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EVENT_KEY_NEEDED_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#EVENT_KEY_NEEDED_COUNT:kotlin.String) Key to extract the count of[OnEventListener.onEvent](https://developer.android.com/reference/kotlin/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))calls of type KEY_NEEDED occurred.                                                                                                                                                                                                 |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EVENT_PROVISION_REQUIRED_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#EVENT_PROVISION_REQUIRED_COUNT:kotlin.String) Key to extract the count of[OnEventListener.onEvent](https://developer.android.com/reference/kotlin/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))calls of type PROVISION_REQUIRED occurred.                                                                                                                                                                         |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EVENT_SESSION_RECLAIMED_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#EVENT_SESSION_RECLAIMED_COUNT:kotlin.String) Key to extract the count of[OnEventListener.onEvent](https://developer.android.com/reference/kotlin/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))calls of type SESSION_RECLAIMED.                                                                                                                                                                                     |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [EVENT_VENDOR_DEFINED_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#EVENT_VENDOR_DEFINED_COUNT:kotlin.String) Key to extract the count of[OnEventListener.onEvent](https://developer.android.com/reference/kotlin/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))calls of type VENDOR_DEFINED.                                                                                                                                                                                              |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [GET_DEVICE_UNIQUE_ID_ERROR_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#GET_DEVICE_UNIQUE_ID_ERROR_COUNT:kotlin.String) Key to extract the number of failed[getPropertyByteArray](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getPropertyByteArray(kotlin.String))calls were made with the[PROPERTY_DEVICE_UNIQUE_ID](https://developer.android.com/reference/kotlin/android/media/MediaDrm#PROPERTY_DEVICE_UNIQUE_ID:kotlin.String)value.                                                                                                                  |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [GET_DEVICE_UNIQUE_ID_ERROR_LIST](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#GET_DEVICE_UNIQUE_ID_ERROR_LIST:kotlin.String) Key to extract the list of error codes that were returned from[getPropertyByteArray](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getPropertyByteArray(kotlin.String))calls with the[PROPERTY_DEVICE_UNIQUE_ID](https://developer.android.com/reference/kotlin/android/media/MediaDrm#PROPERTY_DEVICE_UNIQUE_ID:kotlin.String)value.                                                                                                   |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [GET_DEVICE_UNIQUE_ID_OK_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#GET_DEVICE_UNIQUE_ID_OK_COUNT:kotlin.String) Key to extract the number of successful[getPropertyByteArray](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getPropertyByteArray(kotlin.String))calls were made with the[PROPERTY_DEVICE_UNIQUE_ID](https://developer.android.com/reference/kotlin/android/media/MediaDrm#PROPERTY_DEVICE_UNIQUE_ID:kotlin.String)value.                                                                                                                    |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [GET_KEY_REQUEST_ERROR_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#GET_KEY_REQUEST_ERROR_COUNT:kotlin.String) Key to extract the number of failed[getKeyRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getKeyRequest(kotlin.ByteArray,%20kotlin.ByteArray,%20kotlin.String,%20kotlin.Int,%20java.util.HashMap))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [GET_KEY_REQUEST_ERROR_LIST](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#GET_KEY_REQUEST_ERROR_LIST:kotlin.String) Key to extract the list of error codes that were returned from[getKeyRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getKeyRequest(kotlin.ByteArray,%20kotlin.ByteArray,%20kotlin.String,%20kotlin.Int,%20java.util.HashMap))calls.                                                                                                                                                                                                        |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [GET_KEY_REQUEST_OK_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#GET_KEY_REQUEST_OK_COUNT:kotlin.String) Key to extract the number of successful[getKeyRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getKeyRequest(kotlin.ByteArray,%20kotlin.ByteArray,%20kotlin.String,%20kotlin.Int,%20java.util.HashMap))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.   |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [GET_KEY_REQUEST_OK_TIME_MICROS](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#GET_KEY_REQUEST_OK_TIME_MICROS:kotlin.String) Key to extract the average time in microseconds of calls to[getKeyRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getKeyRequest(kotlin.ByteArray,%20kotlin.ByteArray,%20kotlin.String,%20kotlin.Int,%20java.util.HashMap)).                                                                                                                                                                                                        |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [GET_PROVISION_REQUEST_ERROR_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#GET_PROVISION_REQUEST_ERROR_COUNT:kotlin.String) Key to extract the number of failed[getProvisionRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getProvisionRequest())calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.                                                                 |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [GET_PROVISION_REQUEST_ERROR_LIST](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#GET_PROVISION_REQUEST_ERROR_LIST:kotlin.String) Key to extract the list of error codes that were returned from[getProvisionRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getProvisionRequest())calls.                                                                                                                                                                                                                                                                        |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [GET_PROVISION_REQUEST_OK_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#GET_PROVISION_REQUEST_OK_COUNT:kotlin.String) Key to extract the number of successful[getProvisionRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getProvisionRequest())calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.                                                                   |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_STATUS_EXPIRED_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#KEY_STATUS_EXPIRED_COUNT:kotlin.String) Key to extract the count of[KeyStatus.STATUS_EXPIRED](https://developer.android.com/reference/kotlin/android/media/MediaDrm.KeyStatus#STATUS_EXPIRED:kotlin.Int)events that occurred.                                                                                                                                                                                                                                                                                         |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_STATUS_INTERNAL_ERROR_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#KEY_STATUS_INTERNAL_ERROR_COUNT:kotlin.String) Key to extract the count of[KeyStatus.STATUS_INTERNAL_ERROR](https://developer.android.com/reference/kotlin/android/media/MediaDrm.KeyStatus#STATUS_INTERNAL_ERROR:kotlin.Int)events that occurred.                                                                                                                                                                                                                                                             |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_STATUS_OUTPUT_NOT_ALLOWED_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#KEY_STATUS_OUTPUT_NOT_ALLOWED_COUNT:kotlin.String) Key to extract the count of[KeyStatus.STATUS_OUTPUT_NOT_ALLOWED](https://developer.android.com/reference/kotlin/android/media/MediaDrm.KeyStatus#STATUS_OUTPUT_NOT_ALLOWED:kotlin.Int)events that occurred.                                                                                                                                                                                                                                             |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_STATUS_PENDING_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#KEY_STATUS_PENDING_COUNT:kotlin.String) Key to extract the count of[KeyStatus.STATUS_PENDING](https://developer.android.com/reference/kotlin/android/media/MediaDrm.KeyStatus#STATUS_PENDING:kotlin.Int)events that occurred.                                                                                                                                                                                                                                                                                         |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_STATUS_USABLE_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#KEY_STATUS_USABLE_COUNT:kotlin.String) Key to extract the count of[KeyStatus.STATUS_USABLE](https://developer.android.com/reference/kotlin/android/media/MediaDrm.KeyStatus#STATUS_USABLE:kotlin.Int)events that occurred.                                                                                                                                                                                                                                                                                             |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [OPEN_SESSION_ERROR_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#OPEN_SESSION_ERROR_COUNT:kotlin.String) Key to extract the number of failed #openSession calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.                                                                                                                                                                                       |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [OPEN_SESSION_ERROR_LIST](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#OPEN_SESSION_ERROR_LIST:kotlin.String) Key to extract the list of error codes that were returned from #openSession calls.                                                                                                                                                                                                                                                                                                                                                                                              |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [OPEN_SESSION_OK_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#OPEN_SESSION_OK_COUNT:kotlin.String) Key to extract the number of successful #openSession calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.                                                                                                                                                                                         |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PROVIDE_KEY_RESPONSE_ERROR_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#PROVIDE_KEY_RESPONSE_ERROR_COUNT:kotlin.String) Key to extract the number of failed[provideKeyResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideKeyResponse(kotlin.ByteArray,%20kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.                                 |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PROVIDE_KEY_RESPONSE_ERROR_LIST](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#PROVIDE_KEY_RESPONSE_ERROR_LIST:kotlin.String) Key to extract the list of error codes that were returned from[provideKeyResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideKeyResponse(kotlin.ByteArray,%20kotlin.ByteArray))calls.                                                                                                                                                                                                                                        |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PROVIDE_KEY_RESPONSE_OK_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#PROVIDE_KEY_RESPONSE_OK_COUNT:kotlin.String) Key to extract the number of successful[provideKeyResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideKeyResponse(kotlin.ByteArray,%20kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.                                   |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PROVIDE_KEY_RESPONSE_OK_TIME_MICROS](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#PROVIDE_KEY_RESPONSE_OK_TIME_MICROS:kotlin.String) Key to extract the average time in microseconds of calls to[provideKeyResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideKeyResponse(kotlin.ByteArray,%20kotlin.ByteArray)).                                                                                                                                                                                                                                        |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PROVIDE_PROVISION_RESPONSE_ERROR_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#PROVIDE_PROVISION_RESPONSE_ERROR_COUNT:kotlin.String) Key to extract the number of failed[provideProvisionResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideProvisionResponse(kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.                             |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PROVIDE_PROVISION_RESPONSE_ERROR_LIST](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#PROVIDE_PROVISION_RESPONSE_ERROR_LIST:kotlin.String) Key to extract the list of error codes that were returned from[provideProvisionResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideProvisionResponse(kotlin.ByteArray))calls.                                                                                                                                                                                                                                    |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [PROVIDE_PROVISION_RESPONSE_OK_COUNT](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#PROVIDE_PROVISION_RESPONSE_OK_COUNT:kotlin.String) Key to extract the number of successful[provideProvisionResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideProvisionResponse(kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call.                               |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SESSION_END_TIMES_MS](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#SESSION_END_TIMES_MS:kotlin.String) Key to extract the end times of sessions.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SESSION_START_TIMES_MS](https://developer.android.com/reference/kotlin/android/media/MediaDrm.MetricsConstants#SESSION_START_TIMES_MS:kotlin.String) Key to extract the start times of sessions.                                                                                                                                                                                                                                                                                                                                                                                                                                       |

## Constants

### CLOSE_SESSION_ERROR_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CLOSE_SESSION_ERROR_COUNT: String
```

Key to extract the number of failed[closeSession](https://developer.android.com/reference/kotlin/android/media/MediaDrm#closeSession(kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.close_session.error.count"

### CLOSE_SESSION_ERROR_LIST

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CLOSE_SESSION_ERROR_LIST: String
```

Key to extract the list of error codes that were returned from[closeSession](https://developer.android.com/reference/kotlin/android/media/MediaDrm#closeSession(kotlin.ByteArray))calls. The key is used to lookup the list in the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The list is an array of Long values ([android.os.BaseBundle#getLongArray](https://developer.android.com/reference/kotlin/android/os/BaseBundle.html#getLongArray(kotlin.String))).  

    Value: "drm.mediadrm.close_session.error.list"

### CLOSE_SESSION_OK_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CLOSE_SESSION_OK_COUNT: String
```

Key to extract the number of successful[closeSession](https://developer.android.com/reference/kotlin/android/media/MediaDrm#closeSession(kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.close_session.ok.count"

### EVENT_KEY_EXPIRED_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val EVENT_KEY_EXPIRED_COUNT: String
```

Key to extract the count of[OnEventListener.onEvent](https://developer.android.com/reference/kotlin/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))calls of type KEY_EXPIRED occurred. The count is extracted from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.event.KEY_EXPIRED.count"

### EVENT_KEY_NEEDED_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val EVENT_KEY_NEEDED_COUNT: String
```

Key to extract the count of[OnEventListener.onEvent](https://developer.android.com/reference/kotlin/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))calls of type KEY_NEEDED occurred. The count is extracted from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.event.KEY_NEEDED.count"

### EVENT_PROVISION_REQUIRED_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val EVENT_PROVISION_REQUIRED_COUNT: String
```

Key to extract the count of[OnEventListener.onEvent](https://developer.android.com/reference/kotlin/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))calls of type PROVISION_REQUIRED occurred. The count is extracted from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.event.PROVISION_REQUIRED.count"

### EVENT_SESSION_RECLAIMED_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val EVENT_SESSION_RECLAIMED_COUNT: String
```

Key to extract the count of[OnEventListener.onEvent](https://developer.android.com/reference/kotlin/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))calls of type SESSION_RECLAIMED. The count is extracted from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.event.SESSION_RECLAIMED.count"

### EVENT_VENDOR_DEFINED_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val EVENT_VENDOR_DEFINED_COUNT: String
```

Key to extract the count of[OnEventListener.onEvent](https://developer.android.com/reference/kotlin/android/media/MediaDrm.OnEventListener#onEvent(android.media.MediaDrm,%20kotlin.ByteArray,%20kotlin.Int,%20kotlin.Int,%20kotlin.ByteArray))calls of type VENDOR_DEFINED. The count is extracted from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.event.VENDOR_DEFINED.count"

### GET_DEVICE_UNIQUE_ID_ERROR_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GET_DEVICE_UNIQUE_ID_ERROR_COUNT: String
```

Key to extract the number of failed[getPropertyByteArray](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getPropertyByteArray(kotlin.String))calls were made with the[PROPERTY_DEVICE_UNIQUE_ID](https://developer.android.com/reference/kotlin/android/media/MediaDrm#PROPERTY_DEVICE_UNIQUE_ID:kotlin.String)value. The key is used to lookup the value in the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.get_device_unique_id.error.count"

### GET_DEVICE_UNIQUE_ID_ERROR_LIST

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GET_DEVICE_UNIQUE_ID_ERROR_LIST: String
```

Key to extract the list of error codes that were returned from[getPropertyByteArray](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getPropertyByteArray(kotlin.String))calls with the[PROPERTY_DEVICE_UNIQUE_ID](https://developer.android.com/reference/kotlin/android/media/MediaDrm#PROPERTY_DEVICE_UNIQUE_ID:kotlin.String)value. The key is used to lookup the list in the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The list is an array of Long values ([android.os.BaseBundle#getLongArray](https://developer.android.com/reference/kotlin/android/os/BaseBundle.html#getLongArray(kotlin.String))).  

    Value: "drm.mediadrm.get_device_unique_id.error.list"

### GET_DEVICE_UNIQUE_ID_OK_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GET_DEVICE_UNIQUE_ID_OK_COUNT: String
```

Key to extract the number of successful[getPropertyByteArray](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getPropertyByteArray(kotlin.String))calls were made with the[PROPERTY_DEVICE_UNIQUE_ID](https://developer.android.com/reference/kotlin/android/media/MediaDrm#PROPERTY_DEVICE_UNIQUE_ID:kotlin.String)value. The key is used to lookup the value in the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.get_device_unique_id.ok.count"

### GET_KEY_REQUEST_ERROR_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GET_KEY_REQUEST_ERROR_COUNT: String
```

Key to extract the number of failed[getKeyRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getKeyRequest(kotlin.ByteArray,%20kotlin.ByteArray,%20kotlin.String,%20kotlin.Int,%20java.util.HashMap))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.get_key_request.error.count"

### GET_KEY_REQUEST_ERROR_LIST

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GET_KEY_REQUEST_ERROR_LIST: String
```

Key to extract the list of error codes that were returned from[getKeyRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getKeyRequest(kotlin.ByteArray,%20kotlin.ByteArray,%20kotlin.String,%20kotlin.Int,%20java.util.HashMap))calls. The key is used to lookup the list in the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The list is an array of Long values ([android.os.BaseBundle#getLongArray](https://developer.android.com/reference/kotlin/android/os/BaseBundle.html#getLongArray(kotlin.String))).  

    Value: "drm.mediadrm.get_key_request.error.list"

### GET_KEY_REQUEST_OK_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GET_KEY_REQUEST_OK_COUNT: String
```

Key to extract the number of successful[getKeyRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getKeyRequest(kotlin.ByteArray,%20kotlin.ByteArray,%20kotlin.String,%20kotlin.Int,%20java.util.HashMap))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.get_key_request.ok.count"

### GET_KEY_REQUEST_OK_TIME_MICROS

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GET_KEY_REQUEST_OK_TIME_MICROS: String
```

Key to extract the average time in microseconds of calls to[getKeyRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getKeyRequest(kotlin.ByteArray,%20kotlin.ByteArray,%20kotlin.String,%20kotlin.Int,%20java.util.HashMap)). The value is retrieved from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics()). The time is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.get_key_request.ok.average_time_micros"

### GET_PROVISION_REQUEST_ERROR_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GET_PROVISION_REQUEST_ERROR_COUNT: String
```

Key to extract the number of failed[getProvisionRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getProvisionRequest())calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.get_provision_request.error.count"

### GET_PROVISION_REQUEST_ERROR_LIST

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GET_PROVISION_REQUEST_ERROR_LIST: String
```

Key to extract the list of error codes that were returned from[getProvisionRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getProvisionRequest())calls. The key is used to lookup the list in the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The list is an array of Long values ([android.os.BaseBundle#getLongArray](https://developer.android.com/reference/kotlin/android/os/BaseBundle.html#getLongArray(kotlin.String))).  

    Value: "drm.mediadrm.get_provision_request.error.list"

### GET_PROVISION_REQUEST_OK_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val GET_PROVISION_REQUEST_OK_COUNT: String
```

Key to extract the number of successful[getProvisionRequest](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getProvisionRequest())calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.get_provision_request.ok.count"

### KEY_STATUS_EXPIRED_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val KEY_STATUS_EXPIRED_COUNT: String
```

Key to extract the count of[KeyStatus.STATUS_EXPIRED](https://developer.android.com/reference/kotlin/android/media/MediaDrm.KeyStatus#STATUS_EXPIRED:kotlin.Int)events that occurred. The count is extracted from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.key_status.EXPIRED.count"

### KEY_STATUS_INTERNAL_ERROR_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val KEY_STATUS_INTERNAL_ERROR_COUNT: String
```

Key to extract the count of[KeyStatus.STATUS_INTERNAL_ERROR](https://developer.android.com/reference/kotlin/android/media/MediaDrm.KeyStatus#STATUS_INTERNAL_ERROR:kotlin.Int)events that occurred. The count is extracted from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.key_status.INTERNAL_ERROR.count"

### KEY_STATUS_OUTPUT_NOT_ALLOWED_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val KEY_STATUS_OUTPUT_NOT_ALLOWED_COUNT: String
```

Key to extract the count of[KeyStatus.STATUS_OUTPUT_NOT_ALLOWED](https://developer.android.com/reference/kotlin/android/media/MediaDrm.KeyStatus#STATUS_OUTPUT_NOT_ALLOWED:kotlin.Int)events that occurred. The count is extracted from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.key_status_change.OUTPUT_NOT_ALLOWED.count"

### KEY_STATUS_PENDING_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val KEY_STATUS_PENDING_COUNT: String
```

Key to extract the count of[KeyStatus.STATUS_PENDING](https://developer.android.com/reference/kotlin/android/media/MediaDrm.KeyStatus#STATUS_PENDING:kotlin.Int)events that occurred. The count is extracted from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.key_status_change.PENDING.count"

### KEY_STATUS_USABLE_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val KEY_STATUS_USABLE_COUNT: String
```

Key to extract the count of[KeyStatus.STATUS_USABLE](https://developer.android.com/reference/kotlin/android/media/MediaDrm.KeyStatus#STATUS_USABLE:kotlin.Int)events that occurred. The count is extracted from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.key_status_change.USABLE.count"

### OPEN_SESSION_ERROR_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val OPEN_SESSION_ERROR_COUNT: String
```

Key to extract the number of failed #openSession calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.open_session.error.count"

### OPEN_SESSION_ERROR_LIST

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val OPEN_SESSION_ERROR_LIST: String
```

Key to extract the list of error codes that were returned from #openSession calls. The key is used to lookup the list in the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The list is an array of Long values ([android.os.BaseBundle#getLongArray](https://developer.android.com/reference/kotlin/android/os/BaseBundle.html#getLongArray(kotlin.String))).  

    Value: "drm.mediadrm.open_session.error.list"

### OPEN_SESSION_OK_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val OPEN_SESSION_OK_COUNT: String
```

Key to extract the number of successful #openSession calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.open_session.ok.count"

### PROVIDE_KEY_RESPONSE_ERROR_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val PROVIDE_KEY_RESPONSE_ERROR_COUNT: String
```

Key to extract the number of failed[provideKeyResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideKeyResponse(kotlin.ByteArray,%20kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.provide_key_response.error.count"

### PROVIDE_KEY_RESPONSE_ERROR_LIST

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val PROVIDE_KEY_RESPONSE_ERROR_LIST: String
```

Key to extract the list of error codes that were returned from[provideKeyResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideKeyResponse(kotlin.ByteArray,%20kotlin.ByteArray))calls. The key is used to lookup the list in the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The list is an array of Long values ([android.os.BaseBundle#getLongArray](https://developer.android.com/reference/kotlin/android/os/BaseBundle.html#getLongArray(kotlin.String))).  

    Value: "drm.mediadrm.provide_key_response.error.list"

### PROVIDE_KEY_RESPONSE_OK_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val PROVIDE_KEY_RESPONSE_OK_COUNT: String
```

Key to extract the number of successful[provideKeyResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideKeyResponse(kotlin.ByteArray,%20kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.provide_key_response.ok.count"

### PROVIDE_KEY_RESPONSE_OK_TIME_MICROS

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val PROVIDE_KEY_RESPONSE_OK_TIME_MICROS: String
```

Key to extract the average time in microseconds of calls to[provideKeyResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideKeyResponse(kotlin.ByteArray,%20kotlin.ByteArray)). The value is retrieved from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned from[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics()). The time is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.provide_key_response.ok.average_time_micros"

### PROVIDE_PROVISION_RESPONSE_ERROR_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val PROVIDE_PROVISION_RESPONSE_ERROR_COUNT: String
```

Key to extract the number of failed[provideProvisionResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideProvisionResponse(kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.provide_provision_response.error.count"

### PROVIDE_PROVISION_RESPONSE_ERROR_LIST

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val PROVIDE_PROVISION_RESPONSE_ERROR_LIST: String
```

Key to extract the list of error codes that were returned from[provideProvisionResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideProvisionResponse(kotlin.ByteArray))calls. The key is used to lookup the list in the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The list is an array of Long values ([android.os.BaseBundle#getLongArray](https://developer.android.com/reference/kotlin/android/os/BaseBundle.html#getLongArray(kotlin.String))).  

    Value: "drm.mediadrm.provide_provision_response.error.list"

### PROVIDE_PROVISION_RESPONSE_OK_COUNT

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val PROVIDE_PROVISION_RESPONSE_OK_COUNT: String
```

Key to extract the number of successful[provideProvisionResponse](https://developer.android.com/reference/kotlin/android/media/MediaDrm#provideProvisionResponse(kotlin.ByteArray))calls from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)returned by a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The count is a Long value (android.os.BaseBundle#getLong).  

    Value: "drm.mediadrm.provide_provision_response.ok.count"

### SESSION_END_TIMES_MS

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val SESSION_END_TIMES_MS: String
```

Key to extract the end times of sessions. Times are represented as milliseconds since epoch (1970-01-01T00:00:00Z). The end times are returned from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The end times are returned as another[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)containing the session ids as keys and the end times as long values. Use[android.os.BaseBundle#keySet](https://developer.android.com/reference/kotlin/android/os/BaseBundle.html#keySet())to get the list of session ids, and then android.os.BaseBundle#getLong to get the end time for each session.  

    Value: "drm.mediadrm.session_end_times_ms"

### SESSION_START_TIMES_MS

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val SESSION_START_TIMES_MS: String
```

Key to extract the start times of sessions. Times are represented as milliseconds since epoch (1970-01-01T00:00:00Z). The start times are returned from the[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)from a[getMetrics](https://developer.android.com/reference/kotlin/android/media/MediaDrm#getMetrics())call. The start times are returned as another[PersistableBundle](https://developer.android.com/reference/kotlin/android/os/PersistableBundle.html#)containing the session ids as keys and the start times as long values. Use[android.os.BaseBundle#keySet](https://developer.android.com/reference/kotlin/android/os/BaseBundle.html#keySet())to get the list of session ids, and then android.os.BaseBundle#getLong to get the start time for each session.  

    Value: "drm.mediadrm.session_start_times_ms"