Embed build number in non-apex build
Bug: 316978205 Test: m android.hardware.drm-service.widevine Change-Id: Ibf77a0135fa832424f38619bdd2df0ccc53f5849
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "properties.h"
|
||||
#include "properties_configuration.h"
|
||||
#include "wv_android_build_id.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sstream>
|
||||
@@ -136,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user