Pass CdmIdentifier to UsageInfo Methods
The methods on WvContentDecryptionModule related to UsageInfo (Secure Stops) do not work if kDefaultCdmIdentifier has not been provisioned. This can occur if an app provisions and uses an origin without any app on that device ever provisioning the default origin. More concerningly, this will happen 100% of the time on SPOID-using devices, as there is no way to provision the default identifier on these devices. The fix is to pass the current identifier to these methods so that they do not have to use kDefaultCdmIdentifier. Test: build_and_run_all_unit_tests.sh Test: WV GTS Tests Bug: 62431478 Change-Id: I92a8b4acb69c964abe8129bccf2ff48a66c4a9e0
This commit is contained in:
@@ -303,8 +303,9 @@ CdmResponseType WvContentDecryptionModule::Unprovision(
|
||||
}
|
||||
|
||||
CdmResponseType WvContentDecryptionModule::GetUsageInfo(
|
||||
const std::string& app_id, CdmUsageInfo* usage_info) {
|
||||
CdmEngine* cdm_engine = EnsureCdmForIdentifier(kDefaultCdmIdentifier);
|
||||
const std::string& app_id, const CdmIdentifier& identifier,
|
||||
CdmUsageInfo* usage_info) {
|
||||
CdmEngine* cdm_engine = EnsureCdmForIdentifier(identifier);
|
||||
CdmResponseType sts;
|
||||
M_TIME(
|
||||
sts = cdm_engine->GetUsageInfo(
|
||||
@@ -319,8 +320,9 @@ CdmResponseType WvContentDecryptionModule::GetUsageInfo(
|
||||
CdmResponseType WvContentDecryptionModule::GetUsageInfo(
|
||||
const std::string& app_id,
|
||||
const CdmSecureStopId& ssid,
|
||||
const CdmIdentifier& identifier,
|
||||
CdmUsageInfo* usage_info) {
|
||||
CdmEngine* cdm_engine = EnsureCdmForIdentifier(kDefaultCdmIdentifier);
|
||||
CdmEngine* cdm_engine = EnsureCdmForIdentifier(identifier);
|
||||
CdmResponseType sts;
|
||||
M_TIME(
|
||||
sts = cdm_engine->GetUsageInfo(
|
||||
@@ -334,8 +336,8 @@ CdmResponseType WvContentDecryptionModule::GetUsageInfo(
|
||||
}
|
||||
|
||||
CdmResponseType WvContentDecryptionModule::ReleaseAllUsageInfo(
|
||||
const std::string& app_id) {
|
||||
CdmEngine* cdm_engine = EnsureCdmForIdentifier(kDefaultCdmIdentifier);
|
||||
const std::string& app_id, const CdmIdentifier& identifier) {
|
||||
CdmEngine* cdm_engine = EnsureCdmForIdentifier(identifier);
|
||||
CdmResponseType sts;
|
||||
M_TIME(
|
||||
sts = cdm_engine->ReleaseAllUsageInfo(
|
||||
@@ -347,8 +349,9 @@ CdmResponseType WvContentDecryptionModule::ReleaseAllUsageInfo(
|
||||
}
|
||||
|
||||
CdmResponseType WvContentDecryptionModule::ReleaseUsageInfo(
|
||||
const CdmUsageInfoReleaseMessage& message) {
|
||||
CdmEngine* cdm_engine = EnsureCdmForIdentifier(kDefaultCdmIdentifier);
|
||||
const CdmUsageInfoReleaseMessage& message,
|
||||
const CdmIdentifier& identifier) {
|
||||
CdmEngine* cdm_engine = EnsureCdmForIdentifier(identifier);
|
||||
CdmResponseType sts;
|
||||
M_TIME(
|
||||
sts = cdm_engine->ReleaseUsageInfo(
|
||||
|
||||
Reference in New Issue
Block a user