Replace DeviceFiles::LicenseState with CdmOfflineLicenseState

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

Bug: 160006474
Test: WV unit/integration tests
Change-Id: Ied813f58405fcac44f0543f715ab2175129bbf9c
This commit is contained in:
Rahul Frias
2021-04-22 02:53:12 -07:00
parent 46a3f6c608
commit 4c4e746e57
6 changed files with 22 additions and 44 deletions

View File

@@ -30,18 +30,6 @@ namespace wvcdm {
namespace {
const uint64_t kReleaseSessionTimeToLive = 60; // seconds
const uint32_t kUpdateUsageInformationPeriod = 60; // seconds
wvcdm::CdmOfflineLicenseState MapDeviceFilesLicenseState(
wvcdm::DeviceFiles::LicenseState state) {
switch (state) {
case wvcdm::DeviceFiles::LicenseState::kLicenseStateActive:
return wvcdm::kLicenseStateActive;
case wvcdm::DeviceFiles::LicenseState::kLicenseStateReleasing:
return wvcdm::kLicenseStateReleasing;
default:
return wvcdm::kLicenseStateUnknown;
}
}
} // namespace
class UsagePropertySet : public CdmClientPropertySet {
@@ -1130,7 +1118,7 @@ CdmResponseType CdmEngine::GetOfflineLicenseState(
IdToString(key_set_id));
return GET_OFFLINE_LICENSE_STATE_ERROR_2;
}
*license_state = MapDeviceFilesLicenseState(license_data.state);
*license_state = license_data.state;
return NO_ERROR;
}