Store key set ID with usage info

[ Merge of http://go/wvgerrit/16241 and http://go/wvgerrit/16364 ]

This will allow a usage session to be loaded later by key set ID.
This is needed for EME-style secure stop in the new CE CDM API.

b/25816911

Change-Id: I916340047492fbc0556d0e90bd2eac0f3eafe597
This commit is contained in:
Rahul Frias
2016-01-15 11:55:24 -08:00
parent 72a85eb747
commit d2dc2e3670
9 changed files with 140 additions and 15 deletions

View File

@@ -179,7 +179,11 @@ enum {
kLicenseRenewalProhibited = ERROR_DRM_VENDOR_MIN + 165,
kOfflineLicenseProhibited = ERROR_DRM_VENDOR_MIN + 166,
kStorageProhibited = ERROR_DRM_VENDOR_MIN + 167,
kErrorWVDrmMaxErrorUsed = ERROR_DRM_VENDOR_MIN + 167,
kEmptyKeySetIdEng5 = ERROR_DRM_VENDOR_MIN + 168,
kSessionNotFound11 = ERROR_DRM_VENDOR_MIN + 169,
kLoadUsageInfoFileError = ERROR_DRM_VENDOR_MIN + 170,
kLoadUsageInfoMissing = ERROR_DRM_VENDOR_MIN + 171,
kErrorWVDrmMaxErrorUsed = ERROR_DRM_VENDOR_MIN + 171,
// Used by crypto test mode
kErrorTestMode = ERROR_DRM_VENDOR_MAX,

View File

@@ -347,6 +347,14 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
return kOfflineLicenseProhibited;
case wvcdm::STORAGE_PROHIBITED:
return kStorageProhibited;
case wvcdm::EMPTY_KEYSET_ID_ENG_5:
return kEmptyKeySetIdEng5;
case wvcdm::SESSION_NOT_FOUND_11:
return kSessionNotFound11;
case wvcdm::LOAD_USAGE_INFO_FILE_ERROR:
return kLoadUsageInfoFileError;
case wvcdm::LOAD_USAGE_INFO_MISSING:
return kLoadUsageInfoMissing;
case wvcdm::UNKNOWN_ERROR:
return android::ERROR_DRM_UNKNOWN;
case wvcdm::SECURE_BUFFER_REQUIRED: