Add a field indicating online vs offline licenses.

Import of http://go/wvgerrit/68188

This adds an attribute to metrics indicating if the license was online
or offline.

Also, added a unit test for CdmEngineMetricsImpl.

Test: Unit tests. GPlay manual. GTS tests.
Bug: 115523917

Change-Id: Id315c643048914a2c51904451f9665987bc87eb7
This commit is contained in:
Adam Stone
2018-12-11 10:40:32 -08:00
parent 4c5c4caf66
commit 0a64d25067
11 changed files with 88 additions and 11 deletions

View File

@@ -80,6 +80,14 @@ void SetAttributeField<drm_metrics::Attributes::kKeyRequestTypeFieldNumber,
attributes->set_key_request_type(key_request_type);
}
template <>
void SetAttributeField<drm_metrics::Attributes::kLicenseTypeFieldNumber,
CdmLicenseType>(
const CdmLicenseType &license_type,
drm_metrics::Attributes *attributes) {
attributes->set_license_type(license_type);
}
template <>
void SetAttributeField<0, util::Unused>(const util::Unused &,
drm_metrics::Attributes *) {

View File

@@ -46,6 +46,8 @@ message Attributes {
optional uint32 event_type = 15;
// Contains the CdmKeyRequestType defined in wv_cdm_types.h.
optional uint32 key_request_type = 16;
// Contains the CdmLicenseType defined in wv_cdm_types.h.
optional uint32 license_type = 17;
}
// The Counter message is used to store a count value with an associated