Commit 6c37c3c2 by aquilescanta Committed by Oliver Woodman

Add ERROR_CODE_DRM_LICENSE_EXPIRED for KeysExpiredException

The errorCode assignment will be done in a following CL.

PiperOrigin-RevId: 384230228
parent 822f6282
...@@ -76,7 +76,8 @@ public class PlaybackException extends Exception implements Bundleable { ...@@ -76,7 +76,8 @@ public class PlaybackException extends Exception implements Bundleable {
ERROR_CODE_DRM_LICENSE_ACQUISITION_FAILED, ERROR_CODE_DRM_LICENSE_ACQUISITION_FAILED,
ERROR_CODE_DRM_DISALLOWED_OPERATION, ERROR_CODE_DRM_DISALLOWED_OPERATION,
ERROR_CODE_DRM_SYSTEM_ERROR, ERROR_CODE_DRM_SYSTEM_ERROR,
ERROR_CODE_DRM_DEVICE_REVOKED ERROR_CODE_DRM_DEVICE_REVOKED,
ERROR_CODE_DRM_LICENSE_EXPIRED
}) })
public @interface ErrorCode {} public @interface ErrorCode {}
...@@ -196,6 +197,8 @@ public class PlaybackException extends Exception implements Bundleable { ...@@ -196,6 +197,8 @@ public class PlaybackException extends Exception implements Bundleable {
public static final int ERROR_CODE_DRM_SYSTEM_ERROR = 6006; public static final int ERROR_CODE_DRM_SYSTEM_ERROR = 6006;
/** Caused by the device having revoked DRM privileges. */ /** Caused by the device having revoked DRM privileges. */
public static final int ERROR_CODE_DRM_DEVICE_REVOKED = 6007; public static final int ERROR_CODE_DRM_DEVICE_REVOKED = 6007;
/** Caused by an expired DRM license being loaded into an open DRM session. */
public static final int ERROR_CODE_DRM_LICENSE_EXPIRED = 6008;
/** /**
* Player implementations that want to surface custom errors can use error codes greater than this * Player implementations that want to surface custom errors can use error codes greater than this
...@@ -276,6 +279,8 @@ public class PlaybackException extends Exception implements Bundleable { ...@@ -276,6 +279,8 @@ public class PlaybackException extends Exception implements Bundleable {
return "ERROR_CODE_DRM_SYSTEM_ERROR"; return "ERROR_CODE_DRM_SYSTEM_ERROR";
case ERROR_CODE_DRM_DEVICE_REVOKED: case ERROR_CODE_DRM_DEVICE_REVOKED:
return "ERROR_CODE_DRM_DEVICE_REVOKED"; return "ERROR_CODE_DRM_DEVICE_REVOKED";
case ERROR_CODE_DRM_LICENSE_EXPIRED:
return "ERROR_CODE_DRM_LICENSE_EXPIRED";
default: default:
if (errorCode >= CUSTOM_ERROR_CODE_BASE) { if (errorCode >= CUSTOM_ERROR_CODE_BASE) {
return "custom error code"; return "custom error code";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment