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

@@ -281,6 +281,7 @@ TEST(HidlMetricsAdapterTest, AddAllAttrbitues) {
attributes->set_key_status_type(43);
attributes->set_event_type(47);
attributes->set_key_request_type(53);
attributes->set_license_type(59);
DrmMetricGroup::Metric expected_counter_metric = {
"crypto_session_get_token",
@@ -302,7 +303,9 @@ TEST(HidlMetricsAdapterTest, AddAllAttrbitues) {
DrmMetricGroup::ValueType::INT64_TYPE, 43, 0, "" },
{ "event_type", DrmMetricGroup::ValueType::INT64_TYPE, 47, 0, "" },
{ "key_request_type",
DrmMetricGroup::ValueType::INT64_TYPE, 53, 0, "" } },
DrmMetricGroup::ValueType::INT64_TYPE, 53, 0, "" },
{ "license_type",
DrmMetricGroup::ValueType::INT64_TYPE, 59, 0, "" } },
{ { "count", DrmMetricGroup::ValueType::INT64_TYPE, 13, 0, "" } } };
// Confirm that all of the attributes exist in the hidl data.