Key Status should reflect key container security level

[ Merge of http://go/wvgerrit/77506 ]

Callers of MediaDrm can register to be notified when key status
changes and if they are usable for decryption. A number of factors
are evaluated when making this determination. Key container security
level will now be included in the evaluation.

Bug: 78652608
Test: WV unit/integration test, GtsMediaDrmTest, Play movies playback
      testing.

Change-Id: I20243e5cb160f7957e3239e8d05f715ff0ee6dd6
This commit is contained in:
Rahul Frias
2019-05-09 13:49:47 -07:00
parent c71fb10b95
commit 7d78609548
8 changed files with 621 additions and 412 deletions

View File

@@ -635,8 +635,7 @@ CdmResponseType CdmSession::Decrypt(const CdmDecryptionParameters& params) {
return INSUFFICIENT_OUTPUT_PROTECTION;
return NEED_KEY;
}
if (!policy_engine_->CanUseKeyForSecurityLevel(*params.key_id,
security_level_)) {
if (!policy_engine_->CanUseKeyForSecurityLevel(*params.key_id)) {
return KEY_PROHIBITED_FOR_SECURITY_LEVEL;
}
}