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:
Adam Stone
2017-06-26 20:32:10 +00:00
committed by Android (Google) Code Review
34 changed files with 1258 additions and 545 deletions

View File

@@ -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;