Squashed merge 3 CLs.
1. "Change CdmResponseType from enum into a struct" Merged from http://go/wvgerrit/163199 Bug: 253271674 2. "Log request information when server returns 401" Bug: 260760387 Bug: 186031735 Merged from http://go/wvgerrit/162798 3. "Specify server version on the command line" Bug: 251599048 Merged from http://go/wvgerrit/158897 Test: build android.hardware.drm-service.widevine Test: Netflix and Play Movies & TV Test: build_and_run_all_unit_tests.sh Bug: 253271674 Change-Id: I70c950acce070609ee0343920ec68e66b058bc23
This commit is contained in:
@@ -283,7 +283,7 @@ CdmResponseType PolicyEngine::Query(CdmQueryMap* query_response) {
|
||||
|
||||
if (license_state_ == kLicenseStateInitial) {
|
||||
query_response->clear();
|
||||
return NO_ERROR;
|
||||
return CdmResponseType(NO_ERROR);
|
||||
}
|
||||
|
||||
(*query_response)[QUERY_KEY_LICENSE_TYPE] =
|
||||
@@ -307,19 +307,19 @@ CdmResponseType PolicyEngine::Query(CdmQueryMap* query_response) {
|
||||
(*query_response)[QUERY_KEY_RENEWAL_SERVER_URL] =
|
||||
policy_timers_->get_policy().renewal_server_url();
|
||||
|
||||
return NO_ERROR;
|
||||
return CdmResponseType(NO_ERROR);
|
||||
}
|
||||
|
||||
CdmResponseType PolicyEngine::QueryKeyAllowedUsage(
|
||||
const KeyId& key_id, CdmKeyAllowedUsage* key_usage) {
|
||||
if (key_usage == nullptr) {
|
||||
LOGE("Output parameter |key_usage| not provided");
|
||||
return PARAMETER_NULL;
|
||||
return CdmResponseType(PARAMETER_NULL);
|
||||
}
|
||||
if (license_keys_->GetAllowedUsage(key_id, key_usage)) {
|
||||
return NO_ERROR;
|
||||
return CdmResponseType(NO_ERROR);
|
||||
}
|
||||
return KEY_NOT_FOUND_1;
|
||||
return CdmResponseType(KEY_NOT_FOUND_1);
|
||||
}
|
||||
|
||||
bool PolicyEngine::CanUseKeyForSecurityLevel(const KeyId& key_id) {
|
||||
|
||||
Reference in New Issue
Block a user