Allow use of cached initialization data

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

An initial license request may actually result in a service certificate
request. Once the service certificate has been successfully handled,
an app may make a license request without needing to provide
the initialization data again. This behavior was broken in a recent
merge. Correcting the test as well.

b/72182032
Test: Ran wv unit/integration tests

Change-Id: I82401b9a3bf38140706dad859b4ae241b7ddac12
This commit is contained in:
Rahul Frias
2018-01-19 17:10:33 -08:00
parent f8d114ad11
commit bd45d4f0fa
2 changed files with 5 additions and 2 deletions

View File

@@ -372,7 +372,7 @@ CdmResponseType CdmSession::GenerateKeyRequest(
init_data.type().c_str());
return UNSUPPORTED_INIT_DATA;
}
if (init_data.IsEmpty()) {
if (init_data.IsEmpty() && !license_parser_->HasInitData()) {
LOGW("CdmSession::GenerateKeyRequest: init data absent");
return INIT_DATA_NOT_FOUND;
}