Merge "Respond to API Review comments on MediaDrm" into sc-dev

This commit is contained in:
Robert Shih
2021-04-06 21:17:47 +00:00
committed by Android (Google) Code Review
2 changed files with 11 additions and 8 deletions

View File

@@ -22253,10 +22253,10 @@ package android.media {
field public static final int STATUS_USABLE_IN_FUTURE = 5; // 0x5 field public static final int STATUS_USABLE_IN_FUTURE = 5; // 0x5
} }
public static class MediaDrm.LogMessage { public static final class MediaDrm.LogMessage {
field @NonNull public final String message; method @NonNull public String getMessage();
field public final int priority; method public int getPriority();
field public final long timestampMillis; method public long getTimestampMillis();
} }
public static final class MediaDrm.MediaDrmStateException extends java.lang.IllegalStateException { public static final class MediaDrm.MediaDrmStateException extends java.lang.IllegalStateException {

View File

@@ -2991,13 +2991,16 @@ public final class MediaDrm implements AutoCloseable {
* A {@link LogMessage} records an event in the {@link MediaDrm} framework * A {@link LogMessage} records an event in the {@link MediaDrm} framework
* or vendor plugin. * or vendor plugin.
*/ */
public static class LogMessage { public static final class LogMessage {
private final long timestampMillis;
private final int priority;
private final String message;
/** /**
* Timing of the recorded event measured in milliseconds since the Epoch, * Timing of the recorded event measured in milliseconds since the Epoch,
* 1970-01-01 00:00:00 +0000 (UTC). * 1970-01-01 00:00:00 +0000 (UTC).
*/ */
public final long timestampMillis; public final long getTimestampMillis() { return timestampMillis; }
/** /**
* Priority of the recorded event. * Priority of the recorded event.
@@ -3013,13 +3016,13 @@ public final class MediaDrm implements AutoCloseable {
* </ul> * </ul>
*/ */
@Log.Level @Log.Level
public final int priority; public final int getPriority() { return priority; }
/** /**
* Description of the recorded event. * Description of the recorded event.
*/ */
@NonNull @NonNull
public final String message; public final String getMessage() { return message; }
private LogMessage(long timestampMillis, int priority, String message) { private LogMessage(long timestampMillis, int priority, String message) {
this.timestampMillis = timestampMillis; this.timestampMillis = timestampMillis;