Snap for 7444394 from eced697d90 to sc-release

Change-Id: I7a5d50fee46448a396c7f94a027d09cbad8e87d8
This commit is contained in:
android-build-team Robot
2021-06-10 01:29:38 +00:00
10 changed files with 288281 additions and 286403 deletions

View File

@@ -161,7 +161,7 @@ cc_binary {
srcs: ["src_hidl/service.cpp"],
init_rc: ["src_hidl/android.hardware.drm@1.3-service.widevine.rc"],
vintf_fragments: ["manifest_android.hardware.drm@1.3-service.widevine.xml"],
vintf_fragments: ["manifest_android.hardware.drm@1.4-service.widevine.xml"],
}
@@ -178,7 +178,7 @@ cc_binary {
srcs: ["src_hidl/serviceLazy.cpp"],
overrides: ["android.hardware.drm@1.3-service.widevine"],
init_rc: ["src_hidl/android.hardware.drm@1.3-service-lazy.widevine.rc"],
vintf_fragments: ["manifest_android.hardware.drm@1.3-service.widevine.xml"],
vintf_fragments: ["manifest_android.hardware.drm@1.4-service.widevine.xml"],
}

View File

@@ -312,6 +312,9 @@ class CdmSession {
// license type release and offline related information
CdmKeySetId key_set_id_;
bool has_license_been_loaded_ = false;
bool has_license_been_restored_ = false;
bool mock_license_parser_in_use_;
bool mock_policy_engine_in_use_;

View File

@@ -414,7 +414,7 @@ enum CdmResponseType : int32_t {
SHRINK_USAGE_TABLE_HEADER_ENTRY_IN_USE = 359,
LICENSE_USAGE_ENTRY_MISSING = 360,
LOAD_USAGE_ENTRY_INVALID_SESSION = 361,
// previously RESTORE_OFFLINE_LICENSE_ERROR_3 = 362,
RESTORE_OFFLINE_LICENSE_ERROR_3 = 362,
NO_SRM_VERSION = 363,
SESSION_NOT_FOUND_23 = 364,
CERT_PROVISIONING_RESPONSE_ERROR_9 = 365,

View File

@@ -215,6 +215,12 @@ CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id,
if (!key_set_id_.empty()) {
file_handle_->UnreserveLicenseId(key_set_id_);
}
if (has_license_been_loaded_ || has_license_been_restored_) {
LOGE(
"Disallow multiple offline license restores or restoring a license if "
"a license has already been loaded");
return RESTORE_OFFLINE_LICENSE_ERROR_3;
}
key_set_id_ = key_set_id;
@@ -338,6 +344,7 @@ CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id,
license_received_ = true;
is_offline_ = true;
is_release_ = license_type == kLicenseTypeRelease;
has_license_been_restored_ = true;
return KEY_ADDED;
}
@@ -582,6 +589,7 @@ CdmResponseType CdmSession::AddKeyInternal(const CdmKeyResponse& key_response) {
if (sts != NO_ERROR) return sts;
}
has_license_been_loaded_ = true;
return KEY_ADDED;
}

View File

@@ -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:

View File

@@ -167,6 +167,7 @@ static Status mapCdmResponseType_1_0(wvcdm::CdmResponseType res) {
case wvcdm::RENEW_KEY_ERROR_1:
case wvcdm::RENEW_KEY_ERROR_2:
case wvcdm::RESTORE_OFFLINE_LICENSE_ERROR_2:
case wvcdm::RESTORE_OFFLINE_LICENSE_ERROR_3:
case wvcdm::NOT_INITIALIZED_ERROR:
case wvcdm::REINIT_ERROR:
case wvcdm::SESSION_KEYS_NOT_FOUND:
@@ -615,6 +616,7 @@ static S mapCdmResponseType(wvcdm::CdmResponseType res) {
err = ::drm::V1_4::Status::LICENSE_RESTORE_ERROR;
break;
case wvcdm::GET_RELEASED_LICENSE_ERROR:
case wvcdm::RESTORE_OFFLINE_LICENSE_ERROR_3:
err = ::drm::V1_4::Status::LICENSE_STATE_ERROR;
break;
case wvcdm::DEVICE_CERTIFICATE_ERROR_2:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff