Merge "Revert CDM changes from oemcrypto 18.4" into udc-widevine-dev

This commit is contained in:
Treehugger Robot
2024-03-25 05:50:59 +00:00
committed by Android (Google) Code Review
4 changed files with 54 additions and 18 deletions

View File

@@ -261,8 +261,14 @@ CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id,
usage_entry_ = std::move(license_data.usage_entry);
usage_entry_index_ = license_data.usage_entry_index;
CdmResponseType result = LoadPrivateOrLegacyKey(
license_data.drm_certificate, license_data.wrapped_private_key);
// If ATSC mode is enabled, use ATSC DRM cert/private key, rather than any
// cert/private key embedded in the license.
CdmResponseType result =
atsc_mode_enabled_
? LoadPrivateKey()
: LoadPrivateOrLegacyKey(license_data.drm_certificate,
license_data.wrapped_private_key);
if (result != NO_ERROR) return result;
// Attempts to restore a released offline license are treated as a release

View File

@@ -2,17 +2,19 @@
// source code may only be used and distributed under the Widevine License
// Agreement.
#include <android-base/properties.h>
#include <unistd.h>
#include "properties.h"
#include "properties_configuration.h"
#include "wv_android_build_id.h"
#include <unistd.h>
#include <sstream>
#include <string>
#include <android-base/properties.h>
#include "log.h"
#include "properties.h"
#include "properties_configuration.h"
#include "widevine_apex_info.h"
#include "wv_android_constants.h"
#include "widevine_apex_info.h"
namespace {
@@ -135,15 +137,17 @@ bool Properties::GetWVCdmVersion(std::string* version) {
return false;
}
std::string apex_version = "";
std::string build_number;
#ifdef __ANDROID_APEX__
{
auto info = widevine::apex::GetApexInfo();
apex_version = "@" + std::to_string(info->version);
build_number = std::to_string(info->version);
}
#else
build_number = WV_ANDROID_BUILD_ID;
#endif
*version = kWVAndroidCdmVersion + apex_version;
*version = kWVAndroidCdmVersion + "@" + build_number;
return true;
}