summaryrefslogtreecommitdiffstats
path: root/media/libmedia/ICrypto.cpp
diff options
context:
space:
mode:
authorJeff Tinker <jtinker@google.com>2015-05-05 15:09:14 -0700
committerJeff Tinker <jtinker@google.com>2015-05-05 15:09:14 -0700
commitceffd8cc911bd2e685b525f838cd3d8198ab35cf (patch)
tree8aa2467a1ce56b09aaa7725fb792d9dc551cd0d2 /media/libmedia/ICrypto.cpp
parentb408fa26c782c57272f11b46a235cca8c9ccb9be (diff)
downloadframeworks_av-ceffd8cc911bd2e685b525f838cd3d8198ab35cf.zip
frameworks_av-ceffd8cc911bd2e685b525f838cd3d8198ab35cf.tar.gz
frameworks_av-ceffd8cc911bd2e685b525f838cd3d8198ab35cf.tar.bz2
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
Diffstat (limited to 'media/libmedia/ICrypto.cpp')
-rw-r--r--media/libmedia/ICrypto.cpp5
1 files changed, 2 insertions, 3 deletions
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<ICrypto> {
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());
}