Merge "Correct log messages" into rvc-dev

This commit is contained in:
Rahul Frias
2020-03-05 00:01:37 +00:00
committed by Android (Google) Code Review

View File

@@ -78,7 +78,7 @@ CdmResponseType WvContentDecryptionModule::OpenSession(
CdmResponseType WvContentDecryptionModule::CloseSession(
const CdmSessionId& session_id) {
LOGV("WvContentDecryptionModule::CloseSession. id: %s", session_id.c_str());
LOGV("Closing session ID: %s", session_id.c_str());
CdmEngine* cdm_engine = GetCdmForSessionId(session_id);
// TODO(rfrias): Avoid reusing the error codes from CdmEngine.
if (!cdm_engine) return SESSION_NOT_FOUND_1;
@@ -270,9 +270,7 @@ CdmResponseType WvContentDecryptionModule::GetSecureStopIds(
const std::string& app_id, const CdmIdentifier& identifier,
std::vector<CdmSecureStopId>* ssids) {
if (ssids == nullptr) {
LOGE(
"WvContentDecryptionModule::GetSecureStopIds: "
"ssid destination not provided");
LOGE("Secure stop IDs destination not provided");
return PARAMETER_NULL;
}
@@ -300,8 +298,7 @@ CdmResponseType WvContentDecryptionModule::DecryptV16(
// key sharing, the shared session will still be in the same CdmEngine.
CdmEngine* cdm_engine = GetCdmForSessionId(session_id);
if (!cdm_engine) {
LOGE("WvContentDecryptionModule::DecryptV16: session not found: %s",
session_id.c_str());
LOGE("Decrypt session ID not found: %s", session_id.c_str());
return SESSION_NOT_FOUND_18;
}
@@ -354,7 +351,7 @@ CdmResponseType WvContentDecryptionModule::GetMetrics(
std::unique_lock<std::mutex> auto_lock(cdms_lock_);
auto it = cdms_.find(identifier);
if (it == cdms_.end()) {
LOGE("WVContentDecryptionModule::GetMetrics. cdm_identifier not found");
LOGE("Cdm Identifier not found");
// TODO(blueeyes): Add a better error.
return UNKNOWN_ERROR;
}
@@ -414,7 +411,7 @@ CdmResponseType WvContentDecryptionModule::CloseCdm(
std::unique_lock<std::mutex> auto_lock(cdms_lock_);
auto it = cdms_.find(cdm_identifier);
if (it == cdms_.end()) {
LOGE("WVContentDecryptionModule::Close. cdm_identifier not found.");
LOGE("Cdm Identifier not found");
// TODO(blueeyes): Create a better error.
return UNKNOWN_ERROR;
}
@@ -434,7 +431,7 @@ CdmResponseType WvContentDecryptionModule::CloseCdm(
CdmResponseType WvContentDecryptionModule::SetDecryptHash(
const std::string& hash_data, CdmSessionId* id) {
if (id == nullptr) {
LOGE("WVContentDecryptionModule::SetDecryptHash: |id| was not provided");
LOGE("Cdm session ID not provided");
return PARAMETER_NULL;
}
@@ -448,7 +445,7 @@ CdmResponseType WvContentDecryptionModule::SetDecryptHash(
CdmEngine* cdm_engine = GetCdmForSessionId(*id);
if (!cdm_engine) {
LOGE("WVContentDecryptionModule::SetDecryptHash: Unable to find CdmEngine");
LOGE("Unable to find CdmEngine");
return SESSION_NOT_FOUND_20;
}
@@ -461,9 +458,7 @@ CdmResponseType WvContentDecryptionModule::GetDecryptHashError(
CdmEngine* cdm_engine = GetCdmForSessionId(session_id);
if (!cdm_engine) {
LOGE(
"WVContentDecryptionModule::GetDecryptHashError: "
"Unable to find CdmEngine");
LOGE("Unable to find CdmEngine");
return SESSION_NOT_FOUND_20;
}
return cdm_engine->GetDecryptHashError(session_id, hash_error_string);