diff options
author | 2018-01-25 14:00:17 +0000 | |
---|---|---|
committer | 2018-01-25 14:00:17 +0000 | |
commit | 27507d86962047b45aa069c7140cd46c2577c51e (patch) | |
tree | c516df615914c2bd97167b2ab581b7bf0af77fae | |
parent | 53d179d246e4af795546982ca422042fdfd40fc2 (diff) | |
parent | 716f425072ce89adf8a44e3b549b725a20f7dc24 (diff) |
Merge changes from topic "DrmMetrics-MostFrameworkMetrics"
* changes:
Add session times metric definitions.
Adds additional metric constants.
-rw-r--r-- | media/java/android/media/MediaDrm.java | 318 |
1 files changed, 316 insertions, 2 deletions
diff --git a/media/java/android/media/MediaDrm.java b/media/java/android/media/MediaDrm.java index e836230e2273..844f2efe83ab 100644 --- a/media/java/android/media/MediaDrm.java +++ b/media/java/android/media/MediaDrm.java @@ -1597,8 +1597,76 @@ public final class MediaDrm implements AutoCloseable { = "/drm/mediadrm/open_session/error/count"; /** - * Key to extract the number of successful {@link #getKeyRequest} - * calls from the {@link PersistableBundle} returned by a + * Key to extract the list of error codes that were returned from + * {@link #openSession} calls. The key is used to lookup the list + * in the {@link PersistableBundle} returned by a {@link #getMetrics} + * call. + * The list is an array of Long values + * ({@link android.os.BaseBundle#getLongArray}). + */ + public static final String OPEN_SESSION_ERROR_LIST + = "/drm/mediadrm/open_session/error/list"; + + /** + * Key to extract the number of successful {@link #closeSession} calls + * from the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String CLOSE_SESSION_OK_COUNT + = "/drm/mediadrm/close_session/ok/count"; + + /** + * Key to extract the number of failed {@link #closeSession} calls + * from the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String CLOSE_SESSION_ERROR_COUNT + = "/drm/mediadrm/close_session/error/count"; + + /** + * Key to extract the list of error codes that were returned from + * {@link #closeSession} calls. The key is used to lookup the list + * in the {@link PersistableBundle} returned by a {@link #getMetrics} + * call. + * The list is an array of Long values + * ({@link android.os.BaseBundle#getLongArray}). + */ + public static final String CLOSE_SESSION_ERROR_LIST + = "/drm/mediadrm/close_session/error/list"; + + /** + * 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 {@link PersistableBundle} + * from a {@link #getMetrics} call. + * The start times are returned as another {@link PersistableBundle} + * containing the session ids as keys and the start times as long + * values. Use {@link android.os.BaseBundle#keySet} to get the list of + * session ids, and then {@link android.os.BaseBundle#getLong} to get + * the start time for each session. + */ + public static final String SESSION_START_TIMES_MS + = "/drm/mediadrm/session_start_times_ms"; + + /** + * 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 {@link PersistableBundle} + * from a {@link #getMetrics} call. + * The end times are returned as another {@link PersistableBundle} + * containing the session ids as keys and the end times as long + * values. Use {@link android.os.BaseBundle#keySet} to get the list of + * session ids, and then {@link android.os.BaseBundle#getLong} to get + * the end time for each session. + */ + public static final String SESSION_END_TIMES_MS + = "/drm/mediadrm/session_end_times_ms"; + + /** + * Key to extract the number of successful {@link #getKeyRequest} calls + * from the {@link PersistableBundle} returned by a * {@link #getMetrics} call. * The count is a Long value ({@link android.os.BaseBundle#getLong}). */ @@ -1613,5 +1681,251 @@ public final class MediaDrm implements AutoCloseable { */ public static final String GET_KEY_REQUEST_ERROR_COUNT = "/drm/mediadrm/get_key_request/error/count"; + + /** + * Key to extract the list of error codes that were returned from + * {@link #getKeyRequest} calls. The key is used to lookup the list + * in the {@link PersistableBundle} returned by a {@link #getMetrics} + * call. + * The list is an array of Long values + * ({@link android.os.BaseBundle#getLongArray}). + */ + public static final String GET_KEY_REQUEST_ERROR_LIST + = "/drm/mediadrm/get_key_request/error/list"; + + /** + * Key to extract the average time in microseconds of calls to + * {@link #getKeyRequest}. The value is retrieved from the + * {@link PersistableBundle} returned from {@link #getMetrics}. + * The time is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String GET_KEY_REQUEST_OK_TIME_MICROS + = "/drm/mediadrm/get_key_request/ok/average_time_micros"; + + /** + * Key to extract the number of successful {@link #provideKeyResponse} + * calls from the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String PROVIDE_KEY_RESPONSE_OK_COUNT + = "/drm/mediadrm/provide_key_response/ok/count"; + + /** + * Key to extract the number of failed {@link #provideKeyResponse} + * calls from the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String PROVIDE_KEY_RESPONSE_ERROR_COUNT + = "/drm/mediadrm/provide_key_response/error/count"; + + /** + * Key to extract the list of error codes that were returned from + * {@link #provideKeyResponse} calls. The key is used to lookup the + * list in the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The list is an array of Long values + * ({@link android.os.BaseBundle#getLongArray}). + */ + public static final String PROVIDE_KEY_RESPONSE_ERROR_LIST + = "/drm/mediadrm/provide_key_response/error/list"; + + /** + * Key to extract the average time in microseconds of calls to + * {@link #provideKeyResponse}. The valus is retrieved from the + * {@link PersistableBundle} returned from {@link #getMetrics}. + * The time is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String PROVIDE_KEY_RESPONSE_OK_TIME_MICROS + = "/drm/mediadrm/provide_key_response/ok/average_time_micros"; + + /** + * Key to extract the number of successful {@link #getProvisionRequest} + * calls from the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String GET_PROVISION_REQUEST_OK_COUNT + = "/drm/mediadrm/get_provision_request/ok/count"; + + /** + * Key to extract the number of failed {@link #getProvisionRequest} + * calls from the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String GET_PROVISION_REQUEST_ERROR_COUNT + = "/drm/mediadrm/get_provision_request/error/count"; + + /** + * Key to extract the list of error codes that were returned from + * {@link #getProvisionRequest} calls. The key is used to lookup the + * list in the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The list is an array of Long values + * ({@link android.os.BaseBundle#getLongArray}). + */ + public static final String GET_PROVISION_REQUEST_ERROR_LIST + = "/drm/mediadrm/get_provision_request/error/list"; + + /** + * Key to extract the number of successful + * {@link #provideProvisionResponse} calls from the + * {@link PersistableBundle} returned by a {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String PROVIDE_PROVISION_RESPONSE_OK_COUNT + = "/drm/mediadrm/provide_provision_response/ok/count"; + + /** + * Key to extract the number of failed + * {@link #provideProvisionResponse} calls from the + * {@link PersistableBundle} returned by a {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String PROVIDE_PROVISION_RESPONSE_ERROR_COUNT + = "/drm/mediadrm/provide_provision_response/error/count"; + + /** + * Key to extract the list of error codes that were returned from + * {@link #provideProvisionResponse} calls. The key is used to lookup + * the list in the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The list is an array of Long values + * ({@link android.os.BaseBundle#getLongArray}). + */ + public static final String PROVIDE_PROVISION_RESPONSE_ERROR_LIST + = "/drm/mediadrm/provide_provision_response/error/list"; + + /** + * Key to extract the number of successful + * {@link #getPropertyByteArray} calls were made with the + * {@link #PROPERTY_DEVICE_UNIQUE_ID} value. The key is used to lookup + * the value in the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String GET_DEVICE_UNIQUE_ID_OK_COUNT + = "/drm/mediadrm/get_device_unique_id/ok/count"; + + /** + * Key to extract the number of failed + * {@link #getPropertyByteArray} calls were made with the + * {@link #PROPERTY_DEVICE_UNIQUE_ID} value. The key is used to lookup + * the value in the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String GET_DEVICE_UNIQUE_ID_ERROR_COUNT + = "/drm/mediadrm/get_device_unique_id/error/count"; + + /** + * Key to extract the list of error codes that were returned from + * {@link #getPropertyByteArray} calls with the + * {@link #PROPERTY_DEVICE_UNIQUE_ID} value. The key is used to lookup + * the list in the {@link PersistableBundle} returned by a + * {@link #getMetrics} call. + * The list is an array of Long values + * ({@link android.os.BaseBundle#getLongArray}). + */ + public static final String GET_DEVICE_UNIQUE_ID_ERROR_LIST + = "/drm/mediadrm/get_device_unique_id/error/list"; + + /** + * Key to extraact the count of {@link KeyStatus#STATUS_EXPIRED} events + * that occured. The count is extracted from the + * {@link PersistableBundle} returned from a {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String KEY_STATUS_EXPIRED_COUNT + = "/drm/mediadrm/key_status/EXPIRED/count"; + + /** + * Key to extract the count of {@link KeyStatus#STATUS_INTERNAL_ERROR} + * events that occured. The count is extracted from the + * {@link PersistableBundle} returned from a {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String KEY_STATUS_INTERNAL_ERROR_COUNT + = "/drm/mediadrm/key_status/INTERNAL_ERROR/count"; + + /** + * Key to extract the count of + * {@link KeyStatus#STATUS_OUTPUT_NOT_ALLOWED} events that occured. + * The count is extracted from the + * {@link PersistableBundle} returned from a {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String KEY_STATUS_OUTPUT_NOT_ALLOWED_COUNT + = "/drm/mediadrm/key_status_change/OUTPUT_NOT_ALLOWED/count"; + + /** + * Key to extract the count of {@link KeyStatus#STATUS_PENDING} + * events that occured. The count is extracted from the + * {@link PersistableBundle} returned from a {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String KEY_STATUS_PENDING_COUNT + = "/drm/mediadrm/key_status_change/PENDING/count"; + + /** + * Key to extract the count of {@link KeyStatus#STATUS_USABLE} + * events that occured. The count is extracted from the + * {@link PersistableBundle} returned from a {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String KEY_STATUS_USABLE_COUNT + = "/drm/mediadrm/key_status_change/USABLE/count"; + + /** + * Key to extract the count of {@link OnEventListener#onEvent} + * calls of type PROVISION_REQUIRED occured. The count is + * extracted from the {@link PersistableBundle} returned from a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String EVENT_PROVISION_REQUIRED_COUNT + = "/drm/mediadrm/event/PROVISION_REQUIRED/count"; + + /** + * Key to extract the count of {@link OnEventListener#onEvent} + * calls of type KEY_NEEDED occured. The count is + * extracted from the {@link PersistableBundle} returned from a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String EVENT_KEY_NEEDED_COUNT + = "/drm/mediadrm/event/KEY_NEEDED/count"; + + /** + * Key to extract the count of {@link OnEventListener#onEvent} + * calls of type KEY_EXPIRED occured. The count is + * extracted from the {@link PersistableBundle} returned from a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String EVENT_KEY_EXPIRED_COUNT + = "/drm/mediadrm/event/KEY_EXPIRED/count"; + + /** + * Key to extract the count of {@link OnEventListener#onEvent} + * calls of type VENDOR_DEFINED. The count is + * extracted from the {@link PersistableBundle} returned from a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String EVENT_VENDOR_DEFINED_COUNT + = "/drm/mediadrm/event/VENDOR_DEFINED/count"; + + /** + * Key to extract the count of {@link OnEventListener#onEvent} + * calls of type SESSION_RECLAIMED. The count is + * extracted from the {@link PersistableBundle} returned from a + * {@link #getMetrics} call. + * The count is a Long value ({@link android.os.BaseBundle#getLong}). + */ + public static final String EVENT_SESSION_RECLAIMED_COUNT + = "/drm/mediadrm/event/SESSION_RECLAIMED/count"; } } |