Disallow restoring an offline license multiple times
[ Merge of http://go/wvgerrit/126063 ] As a side-effect of fixing b/161865160 CDM checks to flag reloading of an offline license were removed. This left it to the OEMCrypto which varied by device implementation. Checks are being reintroduced to the CDM and will help MediaDrm return the expected error ERROR_LICENSE_STATE. In addition restoring an offline liense to a session where a license is already loaded will be rejected. Bug: 184608310 Bug: 182208685 Test: WV unit/integration tests MediaDrmTest.testMultipleLoadKeys Change-Id: Id8ee069d22819f7823aa6af11a41f35f0a04ce0a
This commit is contained in:
@@ -477,6 +477,8 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kRenewKeyError2;
|
||||
case wvcdm::RESTORE_OFFLINE_LICENSE_ERROR_2:
|
||||
return kRestoreOfflineLicenseError2;
|
||||
case wvcdm::RESTORE_OFFLINE_LICENSE_ERROR_3:
|
||||
return kRestoreOfflineLicenseError3;
|
||||
case wvcdm::SAMPLE_AND_SUBSAMPLE_SIZE_MISMATCH:
|
||||
return kSampleAndSubsampleSizeMismatch;
|
||||
case wvcdm::SESSION_FILE_HANDLE_INIT_ERROR:
|
||||
|
||||
Reference in New Issue
Block a user