Widevine version genrules (2nd attempt)
Bug: 327241925 Bug: 328438268 Test: dumpsys android.hardware.drm.IDrmFactory/widevine Change-Id: I0336f366910de9c4ea8903b09d64c32b8d68c977
This commit is contained in:
@@ -11,8 +11,7 @@ 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 = "18.0.1";
|
||||
static const std::string kWVAndroidCdmVersion_18_0_2 = "18.0.2";
|
||||
static const std::string kWVAndroidCdmVersion = "18.0.1";
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "properties.h"
|
||||
#include "properties_configuration.h"
|
||||
#include "wv_android_build_id.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sstream>
|
||||
@@ -142,19 +143,11 @@ bool Properties::GetWVCdmVersion(std::string* version) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string apex_version = "";
|
||||
#ifdef __ANDROID_APEX__
|
||||
{
|
||||
auto info = widevine::apex::GetApexInfo();
|
||||
apex_version = "@" + std::to_string(info->version);
|
||||
}
|
||||
#endif
|
||||
|
||||
*version = kWVAndroidCdmVersion;
|
||||
if (mediadrm_flags::update_cdm_version_to_18_0_2()) {
|
||||
*version = kWVAndroidCdmVersion_18_0_2 + apex_version;
|
||||
} else {
|
||||
*version = kWVAndroidCdmVersion_18_0_1 + apex_version;
|
||||
(*version)[kWVAndroidCdmVersion.size() - 1] = '2';
|
||||
}
|
||||
*version = *version + "@" + WV_ANDROID_BUILD_ID;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user