Revert "Widevine version genrules"

This reverts commit 9f32150e5f.

Reason for revert: Potential cause for b/328364975

Change-Id: I3d1411cb183bf3faf04dee51f8a191ec796517f4
This commit is contained in:
Vaibhav Devmurari
2024-03-06 11:50:38 +00:00
committed by Android (Google) Code Review
parent 9f32150e5f
commit 8aef692798
8 changed files with 29 additions and 161 deletions

View File

@@ -11,7 +11,8 @@ namespace wvcdm {
// Note: If you change this, make sure you also change
// https://developers.google.com/widevine/drm/client/oemcrypto/compatibility
static const std::string kWVAndroidCdmVersion = "18.0.1";
static const std::string kWVAndroidCdmVersion_18_0_1 = "18.0.1";
static const std::string kWVAndroidCdmVersion_18_0_2 = "18.0.2";
} // namespace wvcdm

View File

@@ -4,7 +4,6 @@
#include "properties.h"
#include "properties_configuration.h"
#include "wv_android_build_id.h"
#include <unistd.h>
#include <sstream>
@@ -143,11 +142,19 @@ bool Properties::GetWVCdmVersion(std::string* version) {
return false;
}
*version = kWVAndroidCdmVersion;
std::string apex_version = "";
#ifdef __ANDROID_APEX__
{
auto info = widevine::apex::GetApexInfo();
apex_version = "@" + std::to_string(info->version);
}
#endif
if (mediadrm_flags::update_cdm_version_to_18_0_2()) {
(*version)[kWVAndroidCdmVersion.size() - 1] = '2';
*version = kWVAndroidCdmVersion_18_0_2 + apex_version;
} else {
*version = kWVAndroidCdmVersion_18_0_1 + apex_version;
}
*version = *version + "@" + WV_ANDROID_BUILD_ID;
return true;
}