Adds proto serialization and logging support for media drm framework metrics.
Bug: 64001676
Test: Ran CTS tests, unit tests and Google Play.
Change-Id: Ie350ac93caa6b35610eb63e4acc860c8e8a5cf5b
getKeyRequest_1_1 was using 1.0 callback.
This fix creates a common function for both 1.0 and 1.1
getKeyRequest to call. The function now calls the version
appropriate callback to return key request data, key type
and default url.
Test: CTS ClearKeySystemTest#testClearKeyPlaybackCenc
Test: CTS ClearKeySystemTest#testGetProperties
Test: CTS ClearKeySystemTest#testSetProperties
Test: Verify getKeyRequest_1_1 is called
bug: 73085826
Change-Id: Id70a92862473540f5a4eb815892a69dfe1601b92
Some metrics required a conversion to using PersistableBundle to support
slightly richer structure (lists, and nested PBs).
BUG: 64001676
Test: Ran updated CTS test and verified Google Play works.
Change-Id: I8f8d67ba04b234f2ac5ac348a8945e20837f98d6
This reverts commit a3c77911df.
Reason for revert: build cop here. The original CL broke build git_master / walleye_asan, hence I'm reverting.
https://android-build.googleplex.com/builds/submitted/4597721/walleye_asan-userdebug/latest/view/logs/build_error.log
In file included from vendor/google/tools/security/fuzzers/libFuzzer/ICrypto_fuzzer/ICrypto_fuzzer.cpp:24:
frameworks/av/include/media/CryptoHal.h:23:10: fatal error: 'android/hardware/drm/1.1/ICryptoFactory.h' file not found
Change-Id: I185d5310cadb9990b864d71e42bba94f4740160c
This change in DrmHal allows us to transfer a PersistableBundle containing
previously unavailable metrics.
Bug: 64001676
Test: CTS test for metrics and GPlay test
Change-Id: I1fa87c76dd980a3f91b4e2d02b37329f6c0a88ec
kVersionValue should return 1.1. Also change getPropertyString
to get value from mStringProperties[] instead of using hard coded
values.
Test: CTS ClearKeySystemTest#testGetProperties
bug: 73031837
Change-Id: I9d108a42a75ac3685d2c6ef58697efffe6152284
Vendors implementing the newly added MediaDrm.setSecurityLevel
HAL found that it was difficult to implement properly. Also the
semantics are somewhat ambiguous from the Java platform API
level. This CL binds the security level assignment to openSession
which clarifies the API for apps as well as making it more
natural to implement in HAL modules.
bug:72831697
bug:64001680
test: VtsHalDrmV1_1TargetTest, GTS media tests
Change-Id: Iaa07727be86ec2bc92be907d5a48c92136dc2014
Adds an implementation of getMetrics to the ClearKey implementation.
BUG: 69635855
Test: VtsHalDrmV1_1TargetTest
Change-Id: I3e01037081e8855e1dc9ff332c27edb8c79040df
Create clearkey HIDL service to support new APIs for drm 1.1 HAL.
The directories are organized into common, default and hidl.
The old shared library source is in common and default.
The new clearkey service source is in common and hidl.
Test: VtsHalDrmV1_1TargetTest
bug: 69635855
Change-Id: I2e8e0e1a39b622aa274ecd32c873d81b95bdc4f8
Also check for NULL mDrmPlugin before casting to V1_1.
Test: Play Movies and NetFlix
bug: 72687425
Change-Id: I47aa18730332a17860b7e27440d417ffd612810f
This reverts commit 09a90ab544.
Fix for regressed b/72666743
Test: manual test to confirm problem is fixed.
See bug for repro steps.
Change-Id: Ifac9a2c3a3a92063d544e39ace48ab14c90b8050
the 'finalized' concept didn't pan out -- remove references to it.
Simplifies the code flow.
Also purged some uses of generateSessionID().
Bug: 71874686
Test: logcat/dumpsys
Change-Id: I39e48526a5696158d8195f47154881ca6ecda266
Methods are needed to release a secure stop by ID and
return a list of secure stops.
Tests: gts media tests
bug:67361434
bug:64001680
Change-Id: If6cb180cb4d2e3b655028955d105aee0cb8d70b6
The metric names need to be consistent with related APIs (e.g.
MediaCodec#getMetrics). Those APIs use dot separators rather than
slashes.
Bug 64001676
Test: Re-ran CTS, unit tests. Smoke with GPlay Movies.
Change-Id: I606e4c4bcbf630d584b9dea80471ad256764a42b
Adds nearly all of the remaining specified framework level metrics.
Also adds a basic unit test to verify that metrics are exported
correctly. A follow-up CL will update the CTS test to touch all metric
values in DrmHal.
BUG: 64001676
Test: New unit test. Smoke tested with GPlay/Walleye.
Change-Id: I4df90675ae304d3c62b7886537328b3d848fd77c
Adds an EventMetric class, associated unit tests, and an instance of the
EventMetric to DrmHal. Also added a unit test for CounterMetric and
created a class to hold all of the future metric instances.
BUG: 64001676
Test: Added and ran unit tests. Also added a CTS test case.
Change-Id: Ic94bedd5f8293a58a939613a4ae69ce656a772be
closeAllSessions() was calling into the hidl interface closeSession
directly, and neglected to check the return status which resulted in
an abort. Instead, call the DrmHal::closeSession() method which handles
the hidl return status correctly.
Test: gts media tests
bug:72400509
Change-Id: I444be998702aeaca2905ddf560a5138d5775a316
This adds a new class CounterMetric which is used to hold metric
information. It also adds a single use case for recording and
reporting a counter metric.
BUG: 64001676
Test: Added and ran a new test for the specific CounterMetric use case.
Change-Id: I39cab8328f135e579f80b6c2fab721da5f569795
Two additional KeyRequestTypes have been added, None and Update. None
indicates that no key request is needed as keys have already been
loaded. Update indicates that while keys have previously been loaded,
an additional (non-renewal) license request is needed.
Bug: 70335058
Test: GtsMediaTestCases
Change-Id: I36a8b334c70140098a01e4a3bea3159fc0a4584f
Methods for querying HDCP, security levels and
number of sessions
bug:64001680
bug:33657579
Test: cts: MediaDrmMockTest, ClearKeySystemTest
gts: GtsMediaTestCases
Change-Id: I7c84df02ec33d305b6bd5ac7479922f87aa64863
Adds support for the new getMetrics call to the IDrm interface and the
DrmHal implementation. The implementation currently returns a dummy
metric collection. Follow-up CLs will flesh out the implementation.
Bug: 64001676
Test: Ran the new unit test created in a related CL; ran Google Play.
Change-Id: Ia6a3af5b59a30ca55267f7e3ba278a510fc8c81e
change from AString to std::string for how media.metrics handles
strings. This severs the dependency on libstagefright_foundation,
where AString is implemented, so we can integrate into places
which do not want to introduce a dependency on libstagefright_foundation.
Bug: 70805723
Test: compilation/linking, CTS subset
Change-Id: I66de971b6ec354444e06112607a2d7614084cef8