Snap for 4686875 from db0911df54 to pi-release
am: 7963e8425a
Change-Id: I6f06341ebaf5e41bd97915d29e2eda67d8fb2868
This commit is contained in:
committed by
android-build-merger
commit
5837cd6fbf
@@ -854,12 +854,20 @@ CdmResponseType CdmEngine::HandleProvisioningResponse(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CdmEngine::IsProvisioned(CdmSecurityLevel security_level) {
|
bool CdmEngine::IsProvisioned(CdmSecurityLevel security_level) {
|
||||||
DeviceFiles handle(file_system_);
|
// To validate whether the given security level is provisioned, we attempt to
|
||||||
if (!handle.Init(security_level)) {
|
// initialize a CdmSession. This verifies the existence of a certificate and
|
||||||
LOGE("CdmEngine::IsProvisioned: unable to initialize device files");
|
// attempts to load it. If this fails, initialization will return an error.
|
||||||
return false;
|
UsagePropertySet property_set;
|
||||||
|
property_set.set_security_level(
|
||||||
|
security_level == kSecurityLevelL3 ? kLevel3 : kLevelDefault);
|
||||||
|
|
||||||
|
CdmSession session(file_system_, metrics_.AddSession());
|
||||||
|
|
||||||
|
CdmResponseType status = session.Init(&property_set);
|
||||||
|
if (NO_ERROR != status) {
|
||||||
|
LOGE("CdmEngine::IsProvisioned: CdmSession::Init returned %lu", status);
|
||||||
}
|
}
|
||||||
return handle.HasCertificate();
|
return status == NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
CdmResponseType CdmEngine::Unprovision(CdmSecurityLevel security_level) {
|
CdmResponseType CdmEngine::Unprovision(CdmSecurityLevel security_level) {
|
||||||
|
|||||||
Reference in New Issue
Block a user