Expose status, add backward compat in tests and remove unused code
* Expose release and offline statuses in CdmEngine. [ Merge of http://go/wvgerrit/14616 ] This will allow me to make some intelligent decisions in the new CE CDM implementation without having to duplicate all the information known in the lower levels. * Account for backward compat support in tests [ Merge of http://go/wvgerrit/14621 ] One test ensures that device path backward compatibility is working, while another assumes it is used. This fixes test results when Properties::security_level_path_backward_compatibility_support() is false. Previously, the CE CDM did not run these tests, and so this went unnoticed. * Remove Lock::Try, which is not used. [ Merge of http://go/wvgerrit/14624 ] Change-Id: Id18cf1f5b18c7322b8b636819276361af225734f
This commit is contained in:
@@ -496,6 +496,28 @@ CdmResponseType CdmEngine::QuerySessionStatus(const CdmSessionId& session_id,
|
||||
return iter->second->QueryStatus(key_info);
|
||||
}
|
||||
|
||||
bool CdmEngine::IsReleaseSession(const CdmSessionId& session_id) {
|
||||
LOGI("CdmEngine::IsReleaseSession");
|
||||
CdmSessionMap::iterator iter = sessions_.find(session_id);
|
||||
if (iter == sessions_.end()) {
|
||||
LOGE("CdmEngine::IsReleaseSession: session_id not found = %s",
|
||||
session_id.c_str());
|
||||
return false;
|
||||
}
|
||||
return iter->second->is_release();
|
||||
}
|
||||
|
||||
bool CdmEngine::IsOfflineSession(const CdmSessionId& session_id) {
|
||||
LOGI("CdmEngine::IsOfflineSession");
|
||||
CdmSessionMap::iterator iter = sessions_.find(session_id);
|
||||
if (iter == sessions_.end()) {
|
||||
LOGE("CdmEngine::IsOfflineSession: session_id not found = %s",
|
||||
session_id.c_str());
|
||||
return false;
|
||||
}
|
||||
return iter->second->is_offline();
|
||||
}
|
||||
|
||||
CdmResponseType CdmEngine::QueryKeyStatus(const CdmSessionId& session_id,
|
||||
CdmQueryMap* key_info) {
|
||||
LOGI("CdmEngine::QueryKeyStatus");
|
||||
|
||||
Reference in New Issue
Block a user