This is part of the effort to remove binder-related classes from libmediadrm.
This change replaces a generic listener for Parcel data with separate
listeners for each event type.
Bug: 134787536
Test: MediaDrmClearkeyTest
Test: NativeMediaDrmClearkeyTest
Test: MediaDrmMockTest
Change-Id: I90cbb75b21cc63737994a01a2171caee5cfb84ad
Added utilities to:
* Query config for IMediaDrmService usage
* Create remote vs local IDrm/ICrypto object based on aforementioned config
Bug: 134787536
Test: MediaDrmClearkeyTest#testClearKeyPlaybackCenc
Change-Id: I72df528c0bbd8a6dbd3c4962ac91eb89696bcaf7
Previously, the NDK has always passed a blank app package name to the
MediaDrm plugins. However, some DRM systems need this value to be filled
in to operate correctly.
Unfortunately, since supplying or not supplying this value can
invalidate existing DRM licenses, we cannot start passing it in for
devices that might have previously run without it. As such, passing it
is only supported on devices for which Q is their first Android release.
Bug: 65680731
Test: CTS NativeMediaDrmClearkeyTest
Change-Id: Icccde9708766a86ccd352c82be25285fc9f8ebca
When the system partition is a later version than vendor,
new MediaDrm APIs will not have HAL implementations. In
this case throw java.lang.UnsupportedOperationException.
bug:110701831
bug:123375769
test: cts media test cases, gts media tests
Change-Id: Ib631bf4d4d245d857e61bd3fe0e5808e430a034d
Also extend clearkey plugin to allow testing
of this change.
Author: Lubin Yin <lubiny@codeaurora.org>
Change-Id: Ie9b9fcd8920a6c843845700e7bba01ffc20a9507
We must only create one DrmListener instance.
We then process different listeners in DrmListener::notify.
To facilitate testing, we call the listeners from clearkey plugin's
provideKeyResponse function. We have previously tested
EventType::VENDOR_DEFINED in the same manner.
bug: 77712870
Test: native CTS test testClearKeyPlaybackCenc
Test: CTS MediaDrmMockTest
Change-Id: Ie15e3012a4068824f72371a66e9fca2ee27180f8
If multiple key requests are made through AMediaDrm_getKeyRequest,
(e.g. Service Certification + key request in private mode), the
new request will be appended to the old request/s.
AMediaDrm_getKeyRequest should just return the most recent request.
Test: CTS test
Modify testQueryKeyStatus to make two back to back queries. The test
should pass.
Test: CTS test
ANDROID_BUILD_TOP= ./android-cts/toolsefed run cts-dev --module CtsMediaTestCases
-t android.media.cts.NativeMediaDrmClearkeyTest#testQueryKeyStatus
bug: 77713912
Change-Id: I21a30572fedc67cdf1d813ea36b92d2a67b4ebb4
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
Implement queryKeyStatus in Clearkey plugin for testing.
Add CTS testQueryKeyStatus in ClearKeySystemTest and
NativeClearKeySystemTest in a separate CL.
Test: CTS - ClearSystemTests
ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m
CtsMediaTestCases --test android.media.cts.ClearKeySystemTest
Test: CTS - NativeClearSystemTests
ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m
CtsMediaTestCases --test android.media.cts.NativeClearKeySystemTest
bug: 64938501
Change-Id: I8371a3b871e90762f1e7c8453dd6002c31f7eb13
Move libmediandk and libcamera2ndk headers into their module
and export them from there. Also move them to the same path
relative to the export as used in the NDK, media/ for
libmediandk and camera/ for libcamera2ndk.
Test: builds
Change-Id: I0b424e0e48bfb5e2b762694a97d799de08f5dda3
Pass application package name to createPlugin and createDrmPlugin.
The application packagename will be used as part of a unique
identifier for drm plugin.
Test: Play Movies.
Test: ANDROID_BUILD_TOP= ./android-gts/tools/gts-tradefed run gts -m
GtsMediaTestCases --test
com.google.android.media.gts.WidevineH264PlaybackTests#testL1With480P60
Verify the application's packagename is reachable in the drm plugin's
debug log.
bug: 27101531
Change-Id: I84fb09b591a7af63f6e20004e910112a4ce6ebac
If session id is not found, the iterator is not incremented
so the end() condition is reached.
The Test:
How is this bug discovered:
Calling AMediaDrm_closeSession() after AMediaDrm_provideKeyResponse()
results in spinning.
This cl is tested on nyc-mr1-dev branch using a NativeClearKeySystemTest
that is not yet checked in. This test will be ported to master soon.
After testing in nyc-mr1-dev, the source in both branches is compared.
Test: ANDROID_BUILD_TOP= ./android-cts/tools/cts-tradefed run cts -m CtsMediaTestCases --test android.media.cts.NativeClearKeySystemTest#testClearKeyPlaybackCenc
bug: 32235473
Change-Id: I58c495d7499f70b7e85cab43911323b143a9d8fd
Part of media security hardening
MediaDrm was temporarily allowed to
run in either mediaserver or mediadrmserver
while all nexus devices were implementing
support for the native_handle representation
of secure buffers. Now that all nexus
devices support native_handle, the MediaDrm
stack can be removed from mediaserver.
b/22990512
Change-Id: Ie5d83bfeb4c4a824e1d0edb4c9452c782d6fd386
Part of media security hardening
This is an intermediate step toward moving
mediadrm to a new service separate from mediaserver.
This first step allows mediadrmservice to run based
on the system property media.mediadrmservice.enable
so it can be selectively enabled on devices that
support using native_handles for secure buffers.
bug: 22990512
Change-Id: I70320f0c4b7861cdba26fbc24c20bce54e5749a4