summaryrefslogtreecommitdiffstats
path: root/drm
diff options
context:
space:
mode:
authorRicardo Cerqueira <ricardo@cyngn.com>2015-11-03 23:35:37 +0000
committerRicardo Cerqueira <ricardo@cyngn.com>2015-11-03 23:35:37 +0000
commit2a4d9df8c969213f1942ea9f116293adbf41e2d3 (patch)
treece8e8abdda03b1ed087b1bbfa88032159991af6a /drm
parentbdf2ad577d53139ec69e44b9cc8b8b90f8be330b (diff)
parent02103bb21c90abdca4e4ba91f7e3e007a82e01fd (diff)
downloadframeworks_av-2a4d9df8c969213f1942ea9f116293adbf41e2d3.zip
frameworks_av-2a4d9df8c969213f1942ea9f116293adbf41e2d3.tar.gz
frameworks_av-2a4d9df8c969213f1942ea9f116293adbf41e2d3.tar.bz2
Merge tag 'android-6.0.0_r5' into HEAD
Android 6.0.0 release 5 Conflicts: media/libstagefright/OggExtractor.cpp media/libstagefright/Utils.cpp Change-Id: I2ea44836c5cc3da8ffa2092522293c433bf7538c
Diffstat (limited to 'drm')
-rw-r--r--drm/common/IDrmManagerService.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/drm/common/IDrmManagerService.cpp b/drm/common/IDrmManagerService.cpp
index b90da1b..f2e14b6 100644
--- a/drm/common/IDrmManagerService.cpp
+++ b/drm/common/IDrmManagerService.cpp
@@ -742,9 +742,11 @@ status_t BpDrmManagerService::decrypt(
const status_t status = reply.readInt32();
ALOGV("Return value of decrypt() is %d", status);
- const int size = reply.readInt32();
- (*decBuffer)->length = size;
- reply.read((void *)(*decBuffer)->data, size);
+ if (status == NO_ERROR) {
+ const int size = reply.readInt32();
+ (*decBuffer)->length = size;
+ reply.read((void *)(*decBuffer)->data, size);
+ }
return status;
}
@@ -1470,9 +1472,11 @@ status_t BnDrmManagerService::onTransact(
reply->writeInt32(status);
- const int size = decBuffer->length;
- reply->writeInt32(size);
- reply->write(decBuffer->data, size);
+ if (status == NO_ERROR) {
+ const int size = decBuffer->length;
+ reply->writeInt32(size);
+ reply->write(decBuffer->data, size);
+ }
clearDecryptHandle(&handle);
delete encBuffer; encBuffer = NULL;