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

Commit e7d25597 authored by Adam Stone's avatar Adam Stone
Browse files

Add CounterMetric and a single use case.

This adds a new class CounterMetric which is used to hold metric
information.  It also adds a single use case for recording and
reporting a counter metric.

BUG: 64001676

Test: Added and ran a new test for the specific CounterMetric use case.
Change-Id: I94ff9d4d965d55af4d78b3f9545f07d634b5abbd
parent c06e10e2
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -1562,10 +1562,19 @@ public final class MediaDrm implements AutoCloseable {
        private MetricsConstants() {}

        /**
         * This is a placeholder metric. More metrics will be added.
         * <P>
         * TODO: Add the full set of metrics constants.
         * Key to extract the number of successful {@link #openSession} calls
         * from the {@link PersistableBundle} returned by a
         * {@link #getMetrics} call.
         */
        public static final String OPEN_SESSION_OK_COUNT
            = "/drm/mediadrm/open_session/ok/count";

        /**
         * Key to extract the number of failed {@link #openSession} calls
         * from the {@link PersistableBundle} returned by a
         * {@link #getMetrics} call.
         */
        public static final String TEMPORARY = "/drm/mediadrm/dummymetric";
        public static final String OPEN_SESSION_ERROR_COUNT
            = "/drm/mediadrm/open_session/error/count";
    }
}