Merge "Clear sessionId regardless of what closeSession returns" into rvc-dev
This commit is contained in:
@@ -334,11 +334,13 @@ Return<void> WVDrmPlugin::openSession_1_1(
|
||||
hidl_vec<uint8_t> hSessionId = toHidlVec(sessionId);
|
||||
if (Status::OK == status) {
|
||||
SecurityLevel currentSecurityLevel = SecurityLevel::UNKNOWN;
|
||||
Return<void> hResult = getSecurityLevel(hSessionId, [&](Status status, SecurityLevel hSecurityLevel) {
|
||||
Return<void> hResult = getSecurityLevel(
|
||||
hSessionId, [&](Status gslStatus, SecurityLevel hSecurityLevel) {
|
||||
currentSecurityLevel = hSecurityLevel;
|
||||
if (Status::OK != status || requestedLevel != hSecurityLevel) {
|
||||
if (Status::OK != gslStatus || requestedLevel != hSecurityLevel) {
|
||||
ALOGE("Failed to open session with the requested security level=%d", requestedLevel);
|
||||
if (Status::OK != closeSession(hSessionId)) sessionId.clear();
|
||||
closeSession(hSessionId);
|
||||
sessionId.clear();
|
||||
}
|
||||
});
|
||||
if (!hResult.isOk() || (requestedLevel != currentSecurityLevel)) {
|
||||
|
||||
Reference in New Issue
Block a user