diff --git a/libwvdrmengine/cdm/src/wv_content_decryption_module.cpp b/libwvdrmengine/cdm/src/wv_content_decryption_module.cpp index ebe19432..d7fecc2a 100644 --- a/libwvdrmengine/cdm/src/wv_content_decryption_module.cpp +++ b/libwvdrmengine/cdm/src/wv_content_decryption_module.cpp @@ -227,6 +227,12 @@ CdmResponseType WvContentDecryptionModule::HandleProvisioningResponse( CdmResponseType WvContentDecryptionModule::Unprovision( CdmSecurityLevel level, const CdmIdentifier& identifier) { CdmEngine* cdm_engine = EnsureCdmForIdentifier(identifier); + // Persistent state is deleted on unprovisioning. The L3 OEMCrypto device + // key may however remain in memory until |OEMCrypto_Terminate| is called. + // It is not regenerated until |OEMCrypto_Initialize| is called. + // Enable immediate OEMCrypto termination and re-initalization on + // unprovisioning. + CryptoSession::DisableDelayedTermination(); return cdm_engine->Unprovision(level); } diff --git a/libwvdrmengine/level3/src/get_unique_id_android.cpp b/libwvdrmengine/level3/src/get_unique_id_android.cpp index e63abc5a..8df8ef8d 100644 --- a/libwvdrmengine/level3/src/get_unique_id_android.cpp +++ b/libwvdrmengine/level3/src/get_unique_id_android.cpp @@ -16,10 +16,7 @@ namespace wvoec3 { const char *getUniqueID(size_t *len) { static std::string unique_id; - unique_id = android::base::GetProperty("ro.serialno", ""); - if (unique_id.empty()) { - unique_id = android::base::GetProperty("net.hostname", "0123456789abc"); - } + unique_id = android::base::GetProperty("ro.serialno", "0123456789abc"); #if defined(IN_APP_FASTBALL) || defined(IN_APP_MOVIES) unique_id += android::base::GetProperty("package.name", "com.google.inapp"); #endif diff --git a/libwvdrmengine/mediadrm/src_hidl/WVDrmPlugin.cpp b/libwvdrmengine/mediadrm/src_hidl/WVDrmPlugin.cpp index 9da6569e..1ef9916b 100644 --- a/libwvdrmengine/mediadrm/src_hidl/WVDrmPlugin.cpp +++ b/libwvdrmengine/mediadrm/src_hidl/WVDrmPlugin.cpp @@ -334,11 +334,13 @@ Return WVDrmPlugin::openSession_1_1( hidl_vec hSessionId = toHidlVec(sessionId); if (Status::OK == status) { SecurityLevel currentSecurityLevel = SecurityLevel::UNKNOWN; - Return hResult = getSecurityLevel(hSessionId, [&](Status status, SecurityLevel hSecurityLevel) { + Return 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)) {