Return key request type none after key rotation

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

Corrected the key type being returned after entitled keys from
init data are loaded. Made test changes to validate.

Bug: 133903028
Test: WV unit/integration tests
Change-Id: Icb44587f5c3aba3b0facae6d83dc9344d6b60833
This commit is contained in:
Rahul Frias
2019-05-29 19:02:14 -07:00
parent f246f028b2
commit 3c9175fec5
4 changed files with 12 additions and 6 deletions

View File

@@ -444,10 +444,14 @@ CdmResponseType CdmSession::GenerateKeyRequestInternal(
} else if (license_received_) {
// A call to GenerateKeyRequest after the initial license has been received
// is either a renewal/release request or a key rotation event
if (init_data.contains_entitled_keys())
if (init_data.contains_entitled_keys()) {
key_request->message.clear();
key_request->type = kKeyRequestTypeNone;
key_request->url.clear();
return license_parser_->HandleEmbeddedKeyData(init_data);
else
} else {
return GenerateRenewalRequest(key_request);
}
} else {
key_request->type = kKeyRequestTypeInitial;