Integrate apex version info to Widevine CDM property

Bug: 272587114
Test: dumpsys android.hardware.drm.IDrmFactory/widevine -p
Change-Id: Ica99867511391c252b67f40162665380bd2d8740
This commit is contained in:
Kyle Zhang
2023-03-15 19:19:36 +00:00
parent a4de7eb9b5
commit ce1fb4f089
3 changed files with 19 additions and 13 deletions

View File

@@ -13,6 +13,7 @@
#include "log.h"
#include "wv_android_constants.h"
#include "widevine_apex_info.h"
namespace {
@@ -134,7 +135,16 @@ bool Properties::GetWVCdmVersion(std::string* version) {
LOGW("Properties::GetWVCdmVersion: Invalid parameter");
return false;
}
*version = kWVAndroidCdmVersion;
std::string apex_version = "";
#ifdef __ANDROID_APEX__
{
auto info = widevine::apex::GetApexInfo();
apex_version = "@" + std::to_string(info->version);
}
#endif
*version = kWVAndroidCdmVersion + apex_version;
return true;
}