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

Commit 9caf1f56 authored by Jeff Tinker's avatar Jeff Tinker Committed by Android (Google) Code Review
Browse files

Merge "Add error code for insufficient output protection" into lmp-dev

parents 8716e3f3 06719472
Loading
Loading
Loading
Loading
+17 −15
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@ enum {
    ERROR_DRM_NOT_PROVISIONED                = DRM_ERROR_BASE - 8,
    ERROR_DRM_DEVICE_REVOKED                 = DRM_ERROR_BASE - 9,
    ERROR_DRM_RESOURCE_BUSY                  = DRM_ERROR_BASE - 10,
    ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION = DRM_ERROR_BASE - 11,
    ERROR_DRM_LAST_USED_ERRORCODE            = DRM_ERROR_BASE - 11,

    ERROR_DRM_VENDOR_MAX                     = DRM_ERROR_BASE - 500,
    ERROR_DRM_VENDOR_MIN                     = DRM_ERROR_BASE - 999,
@@ -100,7 +102,7 @@ enum ActionCode {

// returns true if err is a recognized DRM error code
static inline bool isCryptoError(status_t err) {
    return (ERROR_DRM_RESOURCE_BUSY <= err && err <= ERROR_DRM_UNKNOWN)
    return (ERROR_DRM_LAST_USED_ERRORCODE <= err && err <= ERROR_DRM_UNKNOWN)
            || (ERROR_DRM_VENDOR_MIN <= err && err <= ERROR_DRM_VENDOR_MAX);
}