aidl plugin: add error details to return status
Merged from http://go/wvgerrit/163639 Bug: 253271674 Test: Google TV Test: atest MediaDrmParameterizedTests Test: atest DrmSessionManagerTest Change-Id: I9f0e83774d405466a389d2fd90d693830682dde4
This commit is contained in:
@@ -278,7 +278,7 @@ SharedBufferBase::~SharedBufferBase() {
|
||||
|
||||
// Decrypt
|
||||
std::string errorDetailMsg;
|
||||
Status res = attemptDecrypt(params, hasProtectedData, &errorDetailMsg);
|
||||
auto res = attemptDecrypt(params, hasProtectedData, &errorDetailMsg);
|
||||
native_handle_delete(handle);
|
||||
if (res != Status::OK) {
|
||||
detailedError = errorDetailMsg.data();
|
||||
@@ -296,13 +296,13 @@ SharedBufferBase::~SharedBufferBase() {
|
||||
return binder;
|
||||
}
|
||||
|
||||
Status WVCryptoPlugin::attemptDecrypt(const CdmDecryptionParametersV16& params,
|
||||
bool hasProtectedData,
|
||||
std::string* errorDetailMsg) {
|
||||
::wvdrm::WvStatus WVCryptoPlugin::attemptDecrypt(
|
||||
const CdmDecryptionParametersV16& params, bool hasProtectedData,
|
||||
std::string* errorDetailMsg) {
|
||||
CdmResponseType res = mCDM->DecryptV16(mSessionId, hasProtectedData, params);
|
||||
|
||||
if (::wvdrm::isCdmResponseTypeSuccess(res)) {
|
||||
return Status::OK;
|
||||
return ::wvdrm::WvStatus(Status::OK);
|
||||
} else {
|
||||
ALOGE("Decrypt error in session %s during a sample %s protected data: %d",
|
||||
mSessionId.c_str(), hasProtectedData ? "with" : "without", static_cast<int>(res));
|
||||
@@ -340,7 +340,7 @@ Status WVCryptoPlugin::attemptDecrypt(const CdmDecryptionParametersV16& params,
|
||||
break;
|
||||
}
|
||||
|
||||
return ::wvdrm::mapCdmResponseType<Status>(res);
|
||||
return ::wvdrm::mapCdmResponseType(res);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user