Make GetMaxNumberOfSessions and GetNumberOfOpenSessions security level aware

Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13662/

Change-Id: Id261ab16c4f987dbee78b3ecde4beebbf44f5371
This commit is contained in:
KongQun Yang
2015-03-12 15:12:14 -07:00
parent fa055673d5
commit c88c681050
3 changed files with 30 additions and 18 deletions

View File

@@ -994,7 +994,8 @@ bool CryptoSession::GetNumberOfOpenSessions(size_t* count) {
}
size_t sessions_count;
OEMCryptoResult status = OEMCrypto_GetNumberOfOpenSessions(&sessions_count);
OEMCryptoResult status = OEMCrypto_GetNumberOfOpenSessions(
requested_security_level_, &sessions_count);
if (OEMCrypto_SUCCESS != status) {
LOGW("OEMCrypto_GetNumberOfOpenSessions fails with %d", status);
return false;
@@ -1012,7 +1013,8 @@ bool CryptoSession::GetMaxNumberOfSessions(size_t* max) {
}
size_t max_sessions;
OEMCryptoResult status = OEMCrypto_GetMaxNumberOfSessions(&max_sessions);
OEMCryptoResult status = OEMCrypto_GetMaxNumberOfSessions(
requested_security_level_, &max_sessions);
if (OEMCrypto_SUCCESS != status) {
LOGW("OEMCrypto_GetMaxNumberOfSessions fails with %d", status);
return false;