Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 716f4250 authored by Adam Stone's avatar Adam Stone
Browse files

Add session times metric definitions.

Adds the session start and end times metric definition to the MediaDrm
API.

Bug: 4001676

Test: Regressed unit tests and ran Google Play Movies. New tests pending.
Change-Id: Ib5e9f62057d3a23cc1d13ff1b8f69c14c5116722
parent 035f45f0
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -1636,6 +1636,34 @@ public final class MediaDrm implements AutoCloseable {
        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