Merge "Return apex name for PROPERTY_VENDOR" into udc-dev
This commit is contained in:
@@ -52,7 +52,10 @@ cc_library_static {
|
|||||||
"libutils_headers",
|
"libutils_headers",
|
||||||
],
|
],
|
||||||
|
|
||||||
static_libs: ["libcdm_protos"],
|
static_libs: [
|
||||||
|
"lib_apex_manifest_minimal_proto_lite",
|
||||||
|
"libcdm_protos",
|
||||||
|
],
|
||||||
|
|
||||||
shared_libs: [
|
shared_libs: [
|
||||||
"libbase",
|
"libbase",
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include "media/stagefright/MediaErrors.h"
|
#include "media/stagefright/MediaErrors.h"
|
||||||
#include "openssl/sha.h"
|
#include "openssl/sha.h"
|
||||||
#include "string_conversions.h"
|
#include "string_conversions.h"
|
||||||
|
#include "widevine_apex_info.h"
|
||||||
#include "wv_cdm_constants.h"
|
#include "wv_cdm_constants.h"
|
||||||
#include "wv_metrics.pb.h"
|
#include "wv_metrics.pb.h"
|
||||||
#include "wv_metrics_adapter.h"
|
#include "wv_metrics_adapter.h"
|
||||||
@@ -1063,7 +1064,18 @@ Status WVDrmPlugin::unprovisionDevice() {
|
|||||||
std::string value;
|
std::string value;
|
||||||
|
|
||||||
if (name == "vendor") {
|
if (name == "vendor") {
|
||||||
|
#ifdef __ANDROID_APEX__
|
||||||
|
auto info = ::widevine::apex::GetApexInfo();
|
||||||
|
if (info.ok()) {
|
||||||
|
value = info->name;
|
||||||
|
} else {
|
||||||
|
auto err = info.error();
|
||||||
|
ALOGW("apex info error %d: %s", err.code().value(), err.message().c_str());
|
||||||
|
value = "Google";
|
||||||
|
}
|
||||||
|
#else
|
||||||
value = "Google";
|
value = "Google";
|
||||||
|
#endif
|
||||||
} else if (name == "version") {
|
} else if (name == "version") {
|
||||||
status = queryProperty(wvcdm::QUERY_KEY_WVCDM_VERSION, value);
|
status = queryProperty(wvcdm::QUERY_KEY_WVCDM_VERSION, value);
|
||||||
} else if (name == "description") {
|
} else if (name == "description") {
|
||||||
|
|||||||
Reference in New Issue
Block a user