From 53d6db47e52e8253fac767a98dbf1b67e07e0ec7 Mon Sep 17 00:00:00 2001 From: Rahul Frias Date: Tue, 8 Dec 2020 10:56:41 -0800 Subject: [PATCH] Adding additional logs to the decryption flow [ Merge of http://go/wvgerrit/111507 ] Bug: 174195349 Test: WV unit/integration tests Change-Id: If8eb2c6ba326ed246da7adfa1137e16fe69bb044 --- libwvdrmengine/cdm/core/src/cdm_session.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libwvdrmengine/cdm/core/src/cdm_session.cpp b/libwvdrmengine/cdm/core/src/cdm_session.cpp index 4edc8e73..6d6720e6 100644 --- a/libwvdrmengine/cdm/core/src/cdm_session.cpp +++ b/libwvdrmengine/cdm/core/src/cdm_session.cpp @@ -740,11 +740,16 @@ CdmResponseType CdmSession::Decrypt(const CdmDecryptionParametersV16& params) { if (is_protected) { if (!policy_engine_->CanDecryptContent(params.key_id)) { if (policy_engine_->IsLicenseForFuture()) return DECRYPT_NOT_READY; - if (!policy_engine_->IsSufficientOutputProtection(params.key_id)) + if (!policy_engine_->IsSufficientOutputProtection(params.key_id)) { + LOGE("Key use prohibited as HDCP or resolution requirements not met"); return INSUFFICIENT_OUTPUT_PROTECTION; + } return NEED_KEY; } if (!policy_engine_->CanUseKeyForSecurityLevel(params.key_id)) { + LOGE( + "Key use prohibited as security level requirements in the policy" + " not met"); return KEY_PROHIBITED_FOR_SECURITY_LEVEL; } }