Merge cdm changes to android repo

Bug: 251924225
Test: GtsMediaTestCases
Change-Id: I1b4e64c0abf701fe1f5017f14dc72b72c3ea6770
This commit is contained in:
Kyle Zhang
2022-10-07 23:55:37 +00:00
parent 3cfe7c7299
commit af0168dbed
54 changed files with 295536 additions and 294359 deletions

View File

@@ -566,7 +566,8 @@ CdmResponseType CertificateProvisioning::HandleProvisioningResponse(
const bool result =
ExtractAndDecodeSignedMessage(response_message, &response);
if (!result || response.empty()) {
LOGE("Provisioning response message is an invalid JSON/base64 string");
LOGE("Provisioning response message is an invalid JSON/base64 string: %s",
response.c_str());
return CERT_PROVISIONING_RESPONSE_ERROR_1;
}
}
@@ -733,7 +734,7 @@ bool CertificateProvisioning::ExtractAndDecodeSignedMessage(
if (start == provisioning_response.npos) {
// Message is not properly wrapped - reject it.
LOGE("Cannot locate start substring");
LOGE("Cannot locate start substring '%s'", json_start_substr.c_str());
result->clear();
return false;
}
@@ -742,7 +743,7 @@ bool CertificateProvisioning::ExtractAndDecodeSignedMessage(
const size_t end = provisioning_response.find(
json_end_substr, start + json_start_substr.length());
if (end == provisioning_response.npos) {
LOGE("Cannot locate end substring");
LOGE("Cannot locate end substring '%s'", json_end_substr.c_str());
result->clear();
return false;
}