Correctly handle local display only for SRM version.
[ Merge of http://go/wvgerrit/105343 ] If a device only supports local display (eliminating the need for an SRM version), then the CDM should treat this as no SRM version. Bug: 166009716 Test: License request integration test Change-Id: I2d9c3f98735563df6d7c7a287abab41bf0a8c513
This commit is contained in:
@@ -617,17 +617,22 @@ CdmResponseType CdmEngine::QueryStatus(SecurityLevel security_level,
|
||||
} else if (query_token == QUERY_KEY_CURRENT_SRM_VERSION) {
|
||||
uint16_t current_srm_version;
|
||||
status = crypto_session->GetSrmVersion(¤t_srm_version);
|
||||
if (status == NOT_IMPLEMENTED_ERROR) {
|
||||
*query_response = QUERY_VALUE_NONE;
|
||||
return NO_ERROR;
|
||||
} else if (status != NO_ERROR) {
|
||||
LOGW("GetCurrentSRMVersion failed: status = %d",
|
||||
static_cast<int>(status));
|
||||
return status;
|
||||
switch (status) {
|
||||
case NO_ERROR: {
|
||||
*query_response = std::to_string(current_srm_version);
|
||||
return NO_ERROR;
|
||||
}
|
||||
case NO_SRM_VERSION: {
|
||||
// SRM is not supported or not applicable (ex. local display only).
|
||||
*query_response = QUERY_VALUE_NONE;
|
||||
return NO_ERROR;
|
||||
}
|
||||
default: {
|
||||
LOGW("GetCurrentSRMVersion failed: status = %d",
|
||||
static_cast<int>(status));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
*query_response = std::to_string(current_srm_version);
|
||||
return NO_ERROR;
|
||||
} else if (query_token == QUERY_KEY_SRM_UPDATE_SUPPORT) {
|
||||
bool is_srm_update_supported = crypto_session->IsSrmUpdateSupported();
|
||||
*query_response =
|
||||
|
||||
Reference in New Issue
Block a user