Include "origin" in license request client ID
[ Merge of http://go/wvgerrit/108823 ] Android CDM will include the session origin in the client info component of the client ID of a license request. The "origin" is only to be included on Android CDM, and not the CE CDM. The origin is provided to the license request via the app parameters in the WVDrmPlugin. A separate GTS test is in development and will be submitted to the Android media GTS test set. Bug: 164549928 Test: Manual test and GTS test Change-Id: I67f8b064b2aefdc08328ea14551d4aa4cb57023d
This commit is contained in:
@@ -34,6 +34,7 @@ static const char* const kDisable = "disable";
|
||||
static const std::string kPsshTag = "pssh";
|
||||
static const char* const kSpecialUnprovisionResponse = "unprovision";
|
||||
static const std::string kKeyAppPackageName = "application_name";
|
||||
static const std::string kKeyOrigin = "origin";
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -520,9 +521,11 @@ Return<void> WVDrmPlugin::getKeyRequest_1_2(
|
||||
cdmParameters[cdmKey] = cdmValue;
|
||||
}
|
||||
|
||||
// Inserting application name into parameters. This will overwrite user
|
||||
// parameters of the same key.
|
||||
// Inserting additional client ID parameters here, this will appear
|
||||
// in the license request.
|
||||
// Note: This will overwrite user parameters of the same key.
|
||||
cdmParameters[kKeyAppPackageName] = mAppPackageName;
|
||||
cdmParameters[kKeyOrigin] = mCdmIdentifierBuilder.origin();
|
||||
|
||||
CdmKeyRequest keyRequest;
|
||||
CdmResponseType res = mCDM->GenerateKeyRequest(
|
||||
@@ -2122,12 +2125,9 @@ Status WVDrmPlugin::unprovision(const CdmIdentifier& identifier) {
|
||||
|
||||
CdmResponseType res1 = mCDM->Unprovision(wvcdm::kSecurityLevelL1, identifier);
|
||||
CdmResponseType res3 = mCDM->Unprovision(wvcdm::kSecurityLevelL3, identifier);
|
||||
if (!isCdmResponseTypeSuccess(res1))
|
||||
{
|
||||
if (!isCdmResponseTypeSuccess(res1)) {
|
||||
return mapCdmResponseType(res1);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
return mapCdmResponseType(res3);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user