Add support for Resource Rating Tiers
[ Merge of http://go/wvgerrit/67324 ] This introduces the ability to query resource rating tier information through the plugin and CDM. Resource rating tiers are also sent in the client identification portion of the license request. Bug: 117112392 Test: WV unit/integration tests Change-Id: I68ac6dfc4362f61150af822bd526e346b5cc4bf7
This commit is contained in:
@@ -1773,6 +1773,25 @@ bool CryptoSession::LoadSrm(const std::string& srm) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CryptoSession::GetResourceRatingTier(uint32_t* tier) {
|
||||
LOGV("GetResourceRatingTier");
|
||||
if (!initialized_) return false;
|
||||
if (tier == nullptr) {
|
||||
LOGE("tier destination not provided");
|
||||
return false;
|
||||
}
|
||||
*tier = OEMCrypto_ResourceRatingTier(requested_security_level_);
|
||||
if (*tier < RESOURCE_RATING_TIER_LOW || *tier > RESOURCE_RATING_TIER_HIGH) {
|
||||
uint32_t api_version;
|
||||
if (GetApiVersion(&api_version)) {
|
||||
if (api_version >= OEM_CRYPTO_API_VERSION_SUPPORTS_RESOURCE_RATING_TIER) {
|
||||
LOGW("GetResourceRatingTier: invalid resource rating tier: %d", *tier);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CryptoSession::GetBuildInformation(std::string* info) {
|
||||
LOGV("GetBuildInformation");
|
||||
if (!initialized_) return false;
|
||||
|
||||
Reference in New Issue
Block a user