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

Commit 06719472 authored by Jeff Tinker's avatar Jeff Tinker
Browse files

Add error code for insufficient output protection

bug: 16034599
Change-Id: Ib52c8bdae83ea138cac897bce78ab651c36c1998
parent d42173a4
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);
}