Merge "Integrate apex version info to Widevine CDM property" into udc-dev
This commit is contained in:
@@ -128,6 +128,7 @@ cc_defaults {
|
|||||||
"libwvdrmcryptoplugin_aidl",
|
"libwvdrmcryptoplugin_aidl",
|
||||||
"libwvdrmdrmplugin_aidl",
|
"libwvdrmdrmplugin_aidl",
|
||||||
"libwvlevel3",
|
"libwvlevel3",
|
||||||
|
"lib_apex_manifest_minimal_proto_lite",
|
||||||
],
|
],
|
||||||
|
|
||||||
stl: "c++_static",
|
stl: "c++_static",
|
||||||
@@ -152,10 +153,6 @@ cc_binary {
|
|||||||
shared_libs: [
|
shared_libs: [
|
||||||
"libbinder_ndk",
|
"libbinder_ndk",
|
||||||
],
|
],
|
||||||
static_libs: [
|
|
||||||
"lib_apex_manifest_minimal_proto_lite",
|
|
||||||
"libprotobuf-cpp-lite",
|
|
||||||
],
|
|
||||||
|
|
||||||
init_rc: ["src/android.hardware.drm-service.widevine.rc"],
|
init_rc: ["src/android.hardware.drm-service.widevine.rc"],
|
||||||
vintf_fragments: ["manifest_android.hardware.drm-service.widevine.xml"],
|
vintf_fragments: ["manifest_android.hardware.drm-service.widevine.xml"],
|
||||||
@@ -225,6 +222,12 @@ cc_library_static {
|
|||||||
"libcrypto",
|
"libcrypto",
|
||||||
"liblog",
|
"liblog",
|
||||||
],
|
],
|
||||||
|
|
||||||
|
static_libs: [
|
||||||
|
"libprotobuf-cpp-lite",
|
||||||
|
"lib_apex_manifest_minimal_proto_lite",
|
||||||
|
],
|
||||||
|
|
||||||
min_sdk_version: "UpsideDownCake",
|
min_sdk_version: "UpsideDownCake",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,6 +276,7 @@ cc_library {
|
|||||||
"libwvdrmcryptoplugin_aidl",
|
"libwvdrmcryptoplugin_aidl",
|
||||||
"libwvdrmdrmplugin_aidl",
|
"libwvdrmdrmplugin_aidl",
|
||||||
"libwvlevel3",
|
"libwvlevel3",
|
||||||
|
"lib_apex_manifest_minimal_proto_lite",
|
||||||
],
|
],
|
||||||
|
|
||||||
shared_libs: [
|
shared_libs: [
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "wv_android_constants.h"
|
#include "wv_android_constants.h"
|
||||||
|
#include "widevine_apex_info.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -134,7 +135,16 @@ bool Properties::GetWVCdmVersion(std::string* version) {
|
|||||||
LOGW("Properties::GetWVCdmVersion: Invalid parameter");
|
LOGW("Properties::GetWVCdmVersion: Invalid parameter");
|
||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,19 +22,11 @@
|
|||||||
|
|
||||||
#include "WVCreatePluginFactories.h"
|
#include "WVCreatePluginFactories.h"
|
||||||
#include "WVDrmFactory.h"
|
#include "WVDrmFactory.h"
|
||||||
#include "widevine_apex_info.h"
|
|
||||||
|
|
||||||
using ::wvdrm::hardware::drm::widevine::createDrmFactory;
|
using ::wvdrm::hardware::drm::widevine::createDrmFactory;
|
||||||
using ::wvdrm::hardware::drm::widevine::WVDrmFactory;
|
using ::wvdrm::hardware::drm::widevine::WVDrmFactory;
|
||||||
|
|
||||||
int main(int /* argc */, char** /* argv */) {
|
int main(int /* argc */, char** /* argv */) {
|
||||||
#ifdef __ANDROID_APEX__
|
|
||||||
{
|
|
||||||
auto info = widevine::apex::GetApexInfo();
|
|
||||||
CHECK(info.ok()) << info.error();
|
|
||||||
LOG(INFO) << "Starting from " << info->name << "(" << info->version << ")";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
ABinderProcess_setThreadPoolMaxThreadCount(8);
|
ABinderProcess_setThreadPoolMaxThreadCount(8);
|
||||||
|
|
||||||
std::shared_ptr<WVDrmFactory> drmFactory = createDrmFactory();
|
std::shared_ptr<WVDrmFactory> drmFactory = createDrmFactory();
|
||||||
|
|||||||
Reference in New Issue
Block a user