From ceffd8cc911bd2e685b525f838cd3d8198ab35cf Mon Sep 17 00:00:00 2001 From: Jeff Tinker Date: Tue, 5 May 2015 15:09:14 -0700 Subject: Pass all DRM errors through ICrypto Previously only the detailed messages for vendor-defined DRM errors were being passed. This change allows detailed messages to be passed for any DRM error, including the ones defined in the framework. bug: 20857014 Change-Id: I72aa85b31ac852fb1fb6ad0a93f3309100b52c9d --- media/libmedia/ICrypto.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'media/libmedia/ICrypto.cpp') diff --git a/media/libmedia/ICrypto.cpp b/media/libmedia/ICrypto.cpp index 9246a7c..2f440fe 100644 --- a/media/libmedia/ICrypto.cpp +++ b/media/libmedia/ICrypto.cpp @@ -142,7 +142,7 @@ struct BpCrypto : public BpInterface { ssize_t result = reply.readInt32(); - if (result >= ERROR_DRM_VENDOR_MIN && result <= ERROR_DRM_VENDOR_MAX) { + if (isCryptoError(result)) { errorDetailMsg->setTo(reply.readCString()); } @@ -319,8 +319,7 @@ status_t BnCrypto::onTransact( reply->writeInt32(result); - if (result >= ERROR_DRM_VENDOR_MIN - && result <= ERROR_DRM_VENDOR_MAX) { + if (isCryptoError(result)) { reply->writeCString(errorDetailMsg.c_str()); } -- cgit v1.1