Return apex name for PROPERTY_VENDOR
[ Merge of go/wvgerrit/c/cdm/+/170370 ] Bug: 277620071 Test: WidevineHalTest Change-Id: I05385358875723e20b13d3abb21a0deee9f35c29
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "media/stagefright/MediaErrors.h"
|
||||
#include "openssl/sha.h"
|
||||
#include "string_conversions.h"
|
||||
#include "widevine_apex_info.h"
|
||||
#include "wv_cdm_constants.h"
|
||||
#include "wv_metrics.pb.h"
|
||||
#include "wv_metrics_adapter.h"
|
||||
@@ -1063,7 +1064,18 @@ Status WVDrmPlugin::unprovisionDevice() {
|
||||
std::string value;
|
||||
|
||||
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";
|
||||
#endif
|
||||
} else if (name == "version") {
|
||||
status = queryProperty(wvcdm::QUERY_KEY_WVCDM_VERSION, value);
|
||||
} else if (name == "description") {
|
||||
|
||||
Reference in New Issue
Block a user