Merge changes I2618c2be,Ie8b9d8b9,I2f39f99c
* changes: Support GetPropertyByteArray for getting metrics. CDM Metrics Protocol buffer serialization. Refactored metrics to support pull model.
This commit is contained in:
@@ -529,13 +529,16 @@ status_t WVDrmPlugin::getPropertyString(const String8& name,
|
||||
|
||||
status_t WVDrmPlugin::getPropertyByteArray(const String8& name,
|
||||
Vector<uint8_t>& value) const {
|
||||
|
||||
if (name == "deviceUniqueId") {
|
||||
return queryProperty(QUERY_KEY_DEVICE_ID, value);
|
||||
} else if (name == "provisioningUniqueId") {
|
||||
return queryProperty(QUERY_KEY_PROVISIONING_ID, value);
|
||||
} else if (name == "serviceCertificate") {
|
||||
value = ToVector(mPropertySet.service_certificate());
|
||||
} else if (name == "metrics") {
|
||||
std::string metrics_value;
|
||||
mCDM->GetSerializedMetrics(&metrics_value);
|
||||
value = ToVector(metrics_value);
|
||||
} else {
|
||||
ALOGE("App requested unknown byte array property %s", name.string());
|
||||
return android::ERROR_DRM_CANNOT_HANDLE;
|
||||
|
||||
Reference in New Issue
Block a user