Support GetPropertyByteArray for getting metrics.

Adds support for GetPropertyByteArray to return a serialized set of metrics
to the caller. This should be the last part of the widevine plugin
changes that fix the referenced bug.  More changes are coming on the
MediaDrm side.

This is a merge of wvgerrit/28422

I intend to submit 2048751, 2048750, and 2048509 together.

Bug: 36217927
Test: Added additional unit tests for affected code.
Change-Id: I2618c2be48d7d780127e35f237e2276efd080879
This commit is contained in:
Adam Stone
2017-03-30 11:31:51 -07:00
parent b851dd8cfd
commit a0da1f067b
9 changed files with 85 additions and 32 deletions

View File

@@ -685,6 +685,10 @@ Return<void> WVDrmPlugin::getPropertyByteArray(
}
} else if (name == "serviceCertificate") {
value = StrToVector(mPropertySet.service_certificate());
} else if (name == "metrics") {
std::string metrics_value;
mCDM->GetSerializedMetrics(&metrics_value);
value = StrToVector(metrics_value);
} else {
ALOGE("App requested unknown byte array property %s", name.c_str());
status = android::ERROR_DRM_CANNOT_HANDLE;