Loading drm/crypto/1.0/ICryptoFactory.hal +3 −2 Original line number Diff line number Diff line Loading @@ -40,8 +40,9 @@ interface ICryptoFactory { * @param uuid uniquely identifies the drm scheme. See * http://dashif.org/identifiers/protection for uuid assignments * @param initData scheme-specific init data. * @return status the status of the call. If the plugin can't * be created, the HAL implementation must return ERROR_DRM_CANNOT_HANDLE. * @return status the status of the call. The HAL implementation must return * OK if the plugin is created and ERROR_DRM_CANNOT_HANDLE if the plugin * cannot be created. * @return cryptoPlugin the created ICryptoPlugin */ createPlugin(uint8_t[16] uuid, vec<uint8_t> initData) Loading drm/crypto/1.0/ICryptoPlugin.hal +3 −6 Original line number Diff line number Diff line Loading @@ -74,8 +74,8 @@ interface ICryptoPlugin { * call to operate on a range of subsamples in a single call * @param source the input buffer for the decryption * @param destination the output buffer for the decryption * @return status the status of the call. The status must be one of * the following: ERROR_DRM_NO_LICENSE if no license keys have been * @return status the status of the call. The status must be OK or one of * the following errors: ERROR_DRM_NO_LICENSE if no license keys have been * loaded, ERROR_DRM_LICENSE_EXPIRED if the license keys have expired, * ERROR_DRM_RESOURCE_BUSY if the resources required to perform the * decryption are not available, ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION Loading @@ -83,12 +83,9 @@ interface ICryptoPlugin { * ERROR_DRM_SESSION_NOT_OPENED if the decrypt session is not opened, or * ERROR_DRM_CANNOT_HANDLE in other failure cases. * @return bytesWritten the number of bytes output from the decryption * @return detailedError if the error is a vendor-specific error, the * vendor's crypto HAL may provide a detailed error string to help * describe the error. */ decrypt(bool secure, uint8_t[16] keyId, uint8_t[16] iv, Mode mode, Pattern pattern, vec<SubSample> subSamples, memory source, DestinationBuffer destination) generates(Status status, uint32_t bytesWritten, string detailedError); generates(Status status, uint32_t bytesWritten); }; drm/crypto/1.0/default/CryptoPlugin.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ namespace implementation { bytesWritten = 0; } _hidl_cb(toStatus(status), bytesWritten, detailMessage.c_str()); _hidl_cb(toStatus(status), bytesWritten); return Void(); } Loading drm/crypto/1.0/default/TypeConvert.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,9 @@ namespace implementation { Status toStatus(status_t legacyStatus) { Status status; switch(legacyStatus) { case android::OK: status = Status::OK; break; case android::ERROR_DRM_NO_LICENSE: status = Status::ERROR_DRM_NO_LICENSE; break; Loading drm/crypto/1.0/types.hal +6 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,12 @@ package android.hardware.drm.crypto@1.0; enum Status : uint32_t { /** * The Crypto plugin must return OK when an operation completes without any * errors. */ OK, /** * The Crypto Plugin must return ERROR_DRM_NO_LICENSE if decryption is * attempted when the license keys have not been loaded into the crypto Loading Loading
drm/crypto/1.0/ICryptoFactory.hal +3 −2 Original line number Diff line number Diff line Loading @@ -40,8 +40,9 @@ interface ICryptoFactory { * @param uuid uniquely identifies the drm scheme. See * http://dashif.org/identifiers/protection for uuid assignments * @param initData scheme-specific init data. * @return status the status of the call. If the plugin can't * be created, the HAL implementation must return ERROR_DRM_CANNOT_HANDLE. * @return status the status of the call. The HAL implementation must return * OK if the plugin is created and ERROR_DRM_CANNOT_HANDLE if the plugin * cannot be created. * @return cryptoPlugin the created ICryptoPlugin */ createPlugin(uint8_t[16] uuid, vec<uint8_t> initData) Loading
drm/crypto/1.0/ICryptoPlugin.hal +3 −6 Original line number Diff line number Diff line Loading @@ -74,8 +74,8 @@ interface ICryptoPlugin { * call to operate on a range of subsamples in a single call * @param source the input buffer for the decryption * @param destination the output buffer for the decryption * @return status the status of the call. The status must be one of * the following: ERROR_DRM_NO_LICENSE if no license keys have been * @return status the status of the call. The status must be OK or one of * the following errors: ERROR_DRM_NO_LICENSE if no license keys have been * loaded, ERROR_DRM_LICENSE_EXPIRED if the license keys have expired, * ERROR_DRM_RESOURCE_BUSY if the resources required to perform the * decryption are not available, ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION Loading @@ -83,12 +83,9 @@ interface ICryptoPlugin { * ERROR_DRM_SESSION_NOT_OPENED if the decrypt session is not opened, or * ERROR_DRM_CANNOT_HANDLE in other failure cases. * @return bytesWritten the number of bytes output from the decryption * @return detailedError if the error is a vendor-specific error, the * vendor's crypto HAL may provide a detailed error string to help * describe the error. */ decrypt(bool secure, uint8_t[16] keyId, uint8_t[16] iv, Mode mode, Pattern pattern, vec<SubSample> subSamples, memory source, DestinationBuffer destination) generates(Status status, uint32_t bytesWritten, string detailedError); generates(Status status, uint32_t bytesWritten); };
drm/crypto/1.0/default/CryptoPlugin.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ namespace implementation { bytesWritten = 0; } _hidl_cb(toStatus(status), bytesWritten, detailMessage.c_str()); _hidl_cb(toStatus(status), bytesWritten); return Void(); } Loading
drm/crypto/1.0/default/TypeConvert.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,9 @@ namespace implementation { Status toStatus(status_t legacyStatus) { Status status; switch(legacyStatus) { case android::OK: status = Status::OK; break; case android::ERROR_DRM_NO_LICENSE: status = Status::ERROR_DRM_NO_LICENSE; break; Loading
drm/crypto/1.0/types.hal +6 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,12 @@ package android.hardware.drm.crypto@1.0; enum Status : uint32_t { /** * The Crypto plugin must return OK when an operation completes without any * errors. */ OK, /** * The Crypto Plugin must return ERROR_DRM_NO_LICENSE if decryption is * attempted when the license keys have not been loaded into the crypto Loading