• Home
  • History
  • Annotate
  • only in /frameworks/av/drm/libmediadrm/
History log of /frameworks/av/drm/libmediadrm/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
20795c7cec69916c7a156e6c7593924d4517f05b 31-May-2018 Jeff Tinker <jtinker@google.com> Fix mediadrmserver segfault in GTS tests

When clearHeapBase is called after a plugin is
closed, a null pointer is dereferenced. Protect
against it with a null pointer check.

Test: GTS media tests, check logcat for faults

bug:80434750
Change-Id: Ib568694c44fe22887c3db4f88e67cb598fd9e36a
ryptoHal.cpp
0db0fa1db2536d5d86dae49a043e8192fe04d1c1 23-May-2018 Jeff Tinker <jtinker@google.com> Unmap shared memory when no longer used

CryptoHal in mediadrmserver was not releasing the
shared memory allocated remotely in the drm HAL
module until the HAL was closed, which could cause
shared memory allocation failures in situations
where multiple memory regions get mapped during
playback. This change releases the shared mapping
in the HAL when it is no longer needed.

bug:80104026

test:
1. manual tests with logging to ensure
shared memory is released
2. gts media tests on walleye

Change-Id: Ie2f306bce6aec697ae584da3f55b3cf72edaa07b
ryptoHal.cpp
b1f8c80d3a0c144407d1bd6b63eb6ac9e90112f2 20-Apr-2018 Jeff Tinker <jtinker@google.com> Fix security vulnerability in CryptoHal

CryptoHal was not checking that the memory heap set by setHeap
was the same one that was actually used for the decrypt call, allowing
the caller to spoof the decrypt call into accessing arbitrary memory.

bug:76221123
test: mediadrmserverpoc included in the bug & GTS media tests
Change-Id: I35214a1a6d0a4b864123e147d1a1adc2377bfbc5
ryptoHal.cpp
ff5ab0678880ade264efda5410822b4aee58d12d 10-May-2018 Adam Stone <blueeyes@google.com> Merge "Fixes the transformation of metrics." into pi-dev
cca23778417af60e793b80c21c021cafb72f49d5 07-May-2018 Jeff Tinker <jtinker@google.com> Fix abort in CryptoHal: missing hidl status check

A method in CryptoHal was not checking the
hidl transaction status which causes an abort
if the transaction fails.

bug:79170524
test:gts media tests, netflix playback

Change-Id: Ia58500f0f2c64f987809360d3d7ead810ee01180
ryptoHal.cpp
630092e11dcff57a3a70e2fe1935bf58c5331e2f 02-May-2018 Adam Stone <blueeyes@google.com> Fix an incorrect CHECK in the code.

This is a trivial fix for an incorrect check.

Bug: 77262269
Test: Re-ran unit tests and GTS tests. Verified Google Play.
Change-Id: I807d8488f65c60c03779064cb92bbbd6c60267e4
rmHal.cpp
342f5ff6ec6d28559464e20139cb5ae133eef31b 04-May-2018 Adam Stone <blueeyes@google.com> Fixes the transformation of metrics.

This changes slightly the way metrics are converted from the HIDL
interface to the MediaDrm interface. This provides a cleaner
representation for querying metrics.

Bug: 73724453
Test: New and existing unit tests. Updated and existing GTS. Google Play
manual.

Change-Id: I9be170784a19ca3e89add53cea1cdfcaad6d65eb
rmMetrics.cpp
ests/DrmMetrics_test.cpp
e641294b59e2a0792d894139d739228f182409b4 01-May-2018 Jeff Tinker <jtinker@google.com> Fix abort due to missing hidl status check

Two methods in DrmHal were not checking the
hidl transaction status which causes an abort
if the transaction fails.

Change-Id: Ie4b6d4ae6507f073efa55412c21ceba317e2881d
related-to-bug:78646354
test:gts media tests, netflix playback
rmHal.cpp
1326ffef6a74ba288809920ab4ad65eda1b33f1f 16-Apr-2018 Jeff Tinker <jtinker@google.com> Fix native_handle leak in CryptoHal

bug:77869193
Change-Id: Ibf9f48c469753fb57025427fa1a3feace4412993
ryptoHal.cpp
fdd2cad293ab12d4066bb944142ca5d6b862c4b9 01-Apr-2018 Edwin Wong <edwinwong@google.com> Fix potential memory leak.

In the onTransact DECRYPT case, the allocated subSamples
are not freed when we encounter an error. Use unique_ptr
to manage memory instead.

Test: Play Movies & TV, Netflix
Test: Gts

bug: 73628269
Change-Id: I36b7deeff0380ee3be31ad5f93a5598cfe02e381
Crypto.cpp
32494f5438db362e96b69e5fda7b2fd34633b562 27-Feb-2018 Adam Stone <blueeyes@google.com> Fixes serialization of vendor metrics

Uses an updated proto model that's more efficient for serialization.

Test: Unit tests, google play and CTS tests.
Bug: 73724218

Change-Id: I936bc18216c0c67de580424b4c62344d94be6b38
ndroid.bp
rmHal.cpp
luginMetricsReporting.cpp
rotos/metrics.proto
5830c5a1b0e10057589eff3b4d0015fe849374a2 28-Feb-2018 Adam Stone <blueeyes@google.com> Merge "Adds HAL metrics support for Media Drm"
4f8f900d3cb8ee117980705ac5df250f9df63bfc 27-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Move mediadrm-related headers"
58ad475e3aa567bec63108970855e6518c90d42e 17-Feb-2018 Jeff Tinker <jtinker@google.com> Fix hidl return checks

Some drm HAL methods were not properly checking
their hidl Return<Status> values which would cause
aborts in some cases. This CL adds checks as needed

Test: GTS media tests
bug:73500808
Change-Id: I47ae0f82d4e614b1e78923ed48fbe4c024df5d71
rmHal.cpp
28f27c3bee88b0f47b1086feeaa904bcdec37af6 06-Feb-2018 Adam Stone <blueeyes@google.com> Adds HAL metrics support for Media Drm

Adds support to fetch metrics from vendor and convert them to a proto
bundle returned from a call to getMetrics.

Bug: 64001676

Test: CTS test for metrics and GPlay test
Change-Id: I05634dd1bf092e64e2d0e77c4c0e243340af48e3
ndroid.bp
rmHal.cpp
rmMetrics.cpp
ests/Android.bp
ests/DrmMetrics_test.cpp
7d2c6e8be2c9a4f3c1364d243856a345f17f851e 17-Feb-2018 Jeff Tinker <jtinker@google.com> Move mediadrm-related headers

Relocate drm and crypto headers from media
to mediadrm to have finer grained ownership

bug:73556221
Change-Id: I7d1b5944f261f9b1fdeed7605e4c0b4b4ca43e1a
ryptoHal.cpp
rmHal.cpp
rmMetrics.cpp
rmPluginPath.cpp
rmSessionManager.cpp
Crypto.cpp
Drm.cpp
DrmClient.cpp
MediaDrmService.cpp
haredLibrary.cpp
ests/DrmMetrics_test.cpp
81b4dff2763c795792f524e1e4cb068b64e659ad 16-Feb-2018 Jeff Tinker <jtinker@google.com> Merge "Fix missing check of hidl return status"
987ac7056040ed1594dc975c8a9d7cee463fa834 16-Feb-2018 Jeff Tinker <jtinker@google.com> Minor code cleanups to DrmHal

Test: builds

Change-Id: I0bec98033e4de020c09374dadaade9d9906f0d40
related-to-bug:64001676
rmHal.cpp
7dfe28f246bce404778f94e977b52699adfcb4ea 15-Feb-2018 Jeff Tinker <jtinker@google.com> Fix missing check of hidl return status

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: I697997eb73ef6d8746fe695509671c4695124cee
rmHal.cpp
fb679e38bbc91614faa917024adddeb51ff07d0a 07-Feb-2018 Adam Stone <blueeyes@google.com> Add logging support for FW metrics

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
ndroid.bp
rmHal.cpp
rmMetrics.cpp
luginMetricsReporting.cpp
rotos/metrics.proto
rotos/plugin_metrics.proto
ests/Android.bp
ests/DrmMetrics_test.cpp
8cc97b178bc6c744eaeef526eca7a4e3f24a1a0e 13-Feb-2018 Adam Stone <blueeyes@google.com> Merge changes from topic "media-drm-fix-list-metrics"

* changes:
Fix Metrics with PersistableBundle support
Fix DrmHal implementation to return all metrics
568b3c45d48fab64c80b2780e8547564d35722e9 31-Jan-2018 Adam Stone <blueeyes@google.com> Fix Metrics with PersistableBundle support

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
rmHal.cpp
rmMetrics.cpp
Drm.cpp
ests/Android.bp
ests/DrmMetrics_test.cpp
e307dc4e7b2c9d3c4018a755db687309cf590369 11-Feb-2018 Jeff Tinker <jtinker@google.com> Revert "Revert "Update drm hal to find drm@1.1 factories""

This reverts commit d3eece8aa39560e8458ba8231b8684d99f11ee6b.

Change-Id: I15ca1dba1a384ccc026406f0a9a02c2598873456
ryptoHal.cpp
rmHal.cpp
41d279a7f3bc55a63b510d4dce07e18964cda152 11-Feb-2018 Jeff Tinker <jtinker@google.com> Revert "Revert "Fix MediaDrm security level APIs""

This reverts commit 5f5e43fa83551a3636b92871bd2ad6b260a8815b.

Change-Id: I72d585fd3768730eef6ad9effdbda81b32418dea
rmHal.cpp
Drm.cpp
5f5e43fa83551a3636b92871bd2ad6b260a8815b 11-Feb-2018 Tobias Thierer <tobiast@google.com> Revert "Fix MediaDrm security level APIs"

This reverts commit 56134cc9e790f39b3b10a18b701b0607c20b6154.

Reason for revert: Build cop here. The CL topic that I'm reverting broke several builds: Drm.h's openSession(Vector<uint8_t> &sessionId) hides overloaded virtual function openSession(DrmPlugin::SecurityLevel securityLevel, ..) from IDrm.h.

https://android-build.googleplex.com/builds/submitted/4598692/full-eng/latest/view/logs/build_error.log

Change-Id: I0de7738748ab793249df68bcbf18232d6a2d120a
rmHal.cpp
Drm.cpp
637b7855829920114a8863b93fe52203b7471eea 30-Jan-2018 Adam Stone <blueeyes@google.com> Fix DrmHal implementation to return all metrics

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
rmHal.cpp
rmMetrics.cpp
Drm.cpp
56134cc9e790f39b3b10a18b701b0607c20b6154 05-Feb-2018 Jeff Tinker <jtinker@google.com> Fix MediaDrm security level APIs

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
rmHal.cpp
Drm.cpp
31067d4b87475dd0a90145d4849cf66f7bf93f86 31-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove finalized concept from media.metrics"
5641aa251bf9a6e7b6bf8a73214f92e42c393a2f 31-Jan-2018 Edwin Wong <edwinwong@google.com> Reset drmPluginV1_1 when destroyPlugin is called.

Also check for NULL mDrmPlugin before casting to V1_1.

Test: Play Movies and NetFlix

bug: 72687425
Change-Id: I47aa18730332a17860b7e27440d417ffd612810f
rmHal.cpp
7fbc087b2187bc67f921d843a59a367c6431eb14 30-Jan-2018 Jeff Tinker <jtinker@google.com> Merge "Revert "Fix missing check of hidl return status""
b2b66fa4da5528cf9cdfc32f619e81e4d97ca654 30-Jan-2018 Jeff Tinker <jtinker@google.com> Revert "Fix missing check of hidl return status"

This reverts commit 09a90ab544a785b36c5b2d1ef352289e2b6f5633.

Fix for regressed b/72666743

Test: manual test to confirm problem is fixed.
See bug for repro steps.

Change-Id: Ifac9a2c3a3a92063d544e39ace48ab14c90b8050
rmHal.cpp
92d23b433bd770c22c2d4a30b573602f5565de1b 29-Jan-2018 Ray Essick <essick@google.com> Remove finalized concept from media.metrics

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
luginMetricsReporting.cpp
15177d7eab8c2300b4f1d577267e528bd7e4eedc 25-Jan-2018 Jeff Tinker <jtinker@google.com> Add new secure stop methods

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
rmHal.cpp
Drm.cpp
b50991d12c70cc2a7e5b71c325769b4bfa5a2e12 25-Jan-2018 Adam Stone <blueeyes@google.com> Merge "Update metric names for API consistency."
566a7290c6af684947c1a757a60eae5da8ab9dee 25-Jan-2018 Adam Stone <blueeyes@google.com> Merge "Adds most remaining framework metrics"
eefbdd95b6c0614527bddc188fb112b9b486212e 25-Jan-2018 Adam Stone <blueeyes@google.com> Merge "Add EventMetric and a single use case."
4bea53c67527030fca3820dbe7d7711badf10cde 25-Jan-2018 Adam Stone <blueeyes@google.com> Update metric names for API consistency.

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
rmMetrics.cpp
ests/DrmMetrics_test.cpp
cea91ce60260d7ebb94449ad7674150fdc227886 23-Jan-2018 Adam Stone <blueeyes@google.com> Adds most remaining framework metrics

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
rmHal.cpp
rmMetrics.cpp
ests/Android.bp
ests/DrmMetrics_test.cpp
91b1f83220c6fc643e2618f92b28482fa880c7fd 25-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix missing check of hidl return status"
f0e618d0ee16c63f918c7bb87ec1ff264d177746 18-Jan-2018 Adam Stone <blueeyes@google.com> Add EventMetric and a single use case.

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
ndroid.bp
rmHal.cpp
rmMetrics.cpp
ests/Android.bp
ests/EventMetric_test.cpp
09a90ab544a785b36c5b2d1ef352289e2b6f5633 24-Jan-2018 Jeff Tinker <jtinker@google.com> Fix missing check of hidl return status

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
rmHal.cpp
e05a10f6d8783f7bc3cd2f78a9115bf3ab63efff 24-Jan-2018 Adam Stone <blueeyes@google.com> Merge "Add CounterMetric and a single use case."
aaf87dd09686bdb47df0a638b622a4c2ea37a331 08-Jan-2018 Adam Stone <blueeyes@google.com> Add CounterMetric and a single use case.

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
rmHal.cpp
ests/Android.bp
ests/CounterMetric_test.cpp
59bc3fa914467f37c32aea1963e9354355b244e7 23-Jan-2018 Rahul Frias <rfrias@google.com> Add new values to KeyRequestType

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
rmHal.cpp
c42670b837dc6e0d63dad891f66735fd7cb3d969 23-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Implement new MediaDrm methods"
4049f13fb3d1c588d3e4dc518ede15d45dca4c9e 22-Jan-2018 Wei Jia <wjia@google.com> MediaPlayer2: build static libs for some components

Test: compiles
Bug: 63934228
Change-Id: I1791b40a67c87ea3146825767699e5022444e433
ndroid.bp
6d998b67be330843f633a563c23c606593060165 18-Dec-2017 Jeff Tinker <jtinker@google.com> Implement new MediaDrm methods

Methods for querying HDCP, security levels and
number of sessions

bug:64001680
bug:33657579

Test: cts: MediaDrmMockTest, ClearKeySystemTest
gts: GtsMediaTestCases

Change-Id: I7c84df02ec33d305b6bd5ac7479922f87aa64863
ndroid.bp
rmHal.cpp
Drm.cpp
da98abadbca65909dbd8b040eddd4b1a2b7633e8 21-Jan-2018 Adam Stone <blueeyes@google.com> Merge "Add support for getMetrics to IDrm"
ab394d13bab3a84f23677357576cee7a6f0c7899 22-Dec-2017 Adam Stone <blueeyes@google.com> Add support for getMetrics to IDrm

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
rmHal.cpp
Drm.cpp
0426c97b51fef73b2df55379b69fff8db0703d57 16-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "media.metrics changes AString -> std::string"
0b68d531017a66db63cc8c41ba28a4f15e9816f0 16-Jan-2018 Jeff Tinker <jtinker@google.com> Merge "Fix use of uninitialized value in libmediadrm" into oc-dev am: 5924e3db24 am: 444b037748 am: 74b97ba8f2
am: 256a84920c

Change-Id: I5e865beb3ae30a1e3305ed0d52e6ecc5e534992c
256a84920c4ce67fd8a4096f0e245ea738290b10 16-Jan-2018 Jeff Tinker <jtinker@google.com> Merge "Fix use of uninitialized value in libmediadrm" into oc-dev am: 5924e3db24 am: 444b037748
am: 74b97ba8f2

Change-Id: I2747be2fd19e31dd99c985492c955c5b2e2b0f62
74b97ba8f248e6d5f9fd98f963d35944f0fe1229 16-Jan-2018 Jeff Tinker <jtinker@google.com> Merge "Fix use of uninitialized value in libmediadrm" into oc-dev am: 5924e3db24
am: 444b037748

Change-Id: I3031e17b0c9ccc8a4eadf78077b08e81e8d64e48
444b0377489aaa6b792e6f1472e95a5f9ee898e0 16-Jan-2018 Jeff Tinker <jtinker@google.com> Merge "Fix use of uninitialized value in libmediadrm" into oc-dev
am: 5924e3db24

Change-Id: Ied4a966d455aabe8f94e1b85ce53e62bcdffd4d0
783bd0d74d142493b4ef0a15a2664535854e99f9 11-Jan-2018 Ray Essick <essick@google.com> media.metrics changes AString -> std::string

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
luginMetricsReporting.cpp
cf11d8f7b8f1e373c2a4ff731c100f7da635c518 12-Jan-2018 Jeff Tinker <jtinker@google.com> Fix potential buffer overflow in mediadrmserver am: 5231cc164f am: 15a7d8c051 am: 54b0a54be4
am: c8797836ab

Change-Id: I51dd484521508341c56668b40ac44a9bb3d5d185
c8797836ab36a0f1c7fc956e72715680934c55a2 12-Jan-2018 Jeff Tinker <jtinker@google.com> Fix potential buffer overflow in mediadrmserver am: 5231cc164f am: 15a7d8c051
am: 54b0a54be4

Change-Id: I4a9005d159649603117eecc2b69a0c6f308c3cac
54b0a54be472a947d46859018b8c6e41d9597a69 12-Jan-2018 Jeff Tinker <jtinker@google.com> Fix potential buffer overflow in mediadrmserver am: 5231cc164f
am: 15a7d8c051

Change-Id: I6e90efefcc0d22fe8a4e1f64e99d1b9e0aeb57a9
15a7d8c051111072e4e601bd5ba0f9cb43e2ce2d 12-Jan-2018 Jeff Tinker <jtinker@google.com> Fix potential buffer overflow in mediadrmserver
am: 5231cc164f

Change-Id: I8ec126d09c8e5ef35a209431228ef3c49a1ee384
2442047f5c6d368f69fa81917f5aabc9b3c342a0 12-Jan-2018 Jeff Tinker <jtinker@google.com> Fix use of uninitialized value in libmediadrm

bug:70526702
test:gts media tests

Change-Id: I29a67dad01ca8c8f649ba12cf08cc86b7eb56523
ryptoHal.cpp
Crypto.cpp
5231cc164fe040a3ab5fcb28baae4e0a4f9fdf4c 11-Jan-2018 Jeff Tinker <jtinker@google.com> Fix potential buffer overflow in mediadrmserver

bug:71389378
test: gts media tests

Change-Id: Ic7d4b456bc874b92fbe202e3dafb7ceac747ebc7
Crypto.cpp
3692d9d49f822c1ce23bc5f28a9d18e4baa8398d 10-Jan-2018 Ray Essick <essick@google.com> Cleaner logging in a 32/64 bit world

Use the portable PRId64 construct to print our 64-bit value.

Bug: 16890215
Test: compilation
Change-Id: If1b5d1731c8d2c4dc267889763ec04a4e3ac5e8e
luginMetricsReporting.cpp
a71eb1246db9d1252e598894156ac7fbb1baa79f 06-Nov-2017 Chong Zhang <chz@google.com> Merge "cas: validate shared buffer size before using -- DO NOT MERGE" into oc-dev
am: 9dcd300f22

Change-Id: Id45c173949fb211b5e12dedb459d94fd22beb513
0211980a373ea71a9556d79fdd60f23c5550024f 31-Oct-2017 Chong Zhang <chz@google.com> cas: validate shared buffer size before using -- DO NOT MERGE

bug: 67962232

test:
cts MediaCasTest

Change-Id: I6bafa324fe6bca5c6a172cc4f9f724ba9f44b7ba
escramblerImpl.cpp
a3ad5bda668f09124e3a8da53075a8e02d38b10f 20-Oct-2017 Steven Moreland <smoreland@google.com> Merge "Use libhidl function to convert to hidl IMemory." am: b63a28ffb1 am: 86d60a6bf6
am: d818b6f9a3

Change-Id: I09155502d7260202065a39d5f5b6e64066f5313d
d818b6f9a32c82878d56da7989a5f12e7d8182b9 20-Oct-2017 Steven Moreland <smoreland@google.com> Merge "Use libhidl function to convert to hidl IMemory." am: b63a28ffb1
am: 86d60a6bf6

Change-Id: I70e0dd71932e727ede2a551d2992dd89de7b489a
86d60a6bf6629d55d3aeb3f6ceae3a443b40044b 20-Oct-2017 Steven Moreland <smoreland@google.com> Merge "Use libhidl function to convert to hidl IMemory."
am: b63a28ffb1

Change-Id: I72204f417430d7d8974c9dff4d2103def56f7fcc
2921de78e6a7df365ed806cf4b98193862a97807 18-Oct-2017 Jeff Tinker <jtinker@google.com> Fix information disclosure in mediadrmserver am: b41a527176 am: 70dc77cc94 am: e41b49b5ea am: 470e03a10b am: d1e097f456 am: 32ae22ff0f am: 4e55c5aae0 am: 88e846c4e7 am: acfb40f741 am: e2f8930c39 am: b3a0e4680b am: 3cf728e758
am: 650e3e6325

Change-Id: I9109b02acf15f7498523569e432141da23edd6c6
650e3e6325c63dadb6bd14b8a13bc73ce1ec0990 18-Oct-2017 Jeff Tinker <jtinker@google.com> Fix information disclosure in mediadrmserver am: b41a527176 am: 70dc77cc94 am: e41b49b5ea am: 470e03a10b am: d1e097f456 am: 32ae22ff0f am: 4e55c5aae0 am: 88e846c4e7 am: acfb40f741 am: e2f8930c39 am: b3a0e4680b
am: 3cf728e758

Change-Id: I53e89f1f051e679cd7c6a5aa7cac2271231e435f
3cf728e75872fe62abd401a0ebdf567cfabaa523 18-Oct-2017 Jeff Tinker <jtinker@google.com> Fix information disclosure in mediadrmserver am: b41a527176 am: 70dc77cc94 am: e41b49b5ea am: 470e03a10b am: d1e097f456 am: 32ae22ff0f am: 4e55c5aae0 am: 88e846c4e7 am: acfb40f741 am: e2f8930c39
am: b3a0e4680b

Change-Id: I3da01ec0b6a9272ae6b7310f4758e526e9af00d7
6536606cfe53e6bdb6415e0f8986381074bd68cf 05-Oct-2017 Steven Moreland <smoreland@google.com> Use libhidl function to convert to hidl IMemory.

Now that this API is available.

This keeps the implementation details of hidl's
ashmem allocator in libhidl itself (it should be
opaque).

Test: try and succeed watching (part of a) DRM protected movie
Bug: 34234561
Change-Id: Ied9beddace2ccfc859833ac55f4e3837db5f495e
ndroid.bp
ryptoHal.cpp
21c721250cef7722217c1e952a6923fb79c84e37 06-Sep-2017 Adam Stone <blueeyes@google.com> Fix package name reporting in MediaDrm metrics.

The app package name was not previously reported in drm metrics. This
change reports the app package name as returned from the vendor metrics.

This is part of the fix. The other change will go into another project.

Bug: 64584568

Test: Unit tests, GTS tests, and Google Play.
Change-Id: Iee36d5203364c5f80a8b0fe9d9bbf5c167abefd1
luginMetricsReporting.cpp
rotos/plugin_metrics.proto
eae126d32aacfd3b2ac5dba059571d30ce8a7444 09-Aug-2017 Jeff Tinker <jtinker@google.com> Merge "Fix failure to check HIDL return status" into oc-dr1-dev
am: 3373ab6abe

Change-Id: Idb5225d222ef732b4bdd43896e81bc0b20f7dc8a
f0e89b0b248976f622fc41da4f678955399def08 08-Aug-2017 Jeff Tinker <jtinker@google.com> Fix failure to check HIDL return status

HIDL transaction status wasn't being checked
resulting in a SIGABRT from createPlugin when the
remote process dies.

bug: 64441780
test: run Play Movies and repeat killing
android.hardware.drm@1.0-service.widevine, check
log for transaction failed messages.

Change-Id: I0ea70578d60bb84cf693f158963181781d7e35c3
rmHal.cpp
81b06822a7ad5034eee0a85fc32c527e669ab274 27-Jul-2017 Jeff Tinker <jtinker@google.com> Fix failure to check HIDL return status

Test: run Play Movies and repeat killing
android.hardware.drm@1.0-service.widevine, check
log for transaction failed messages. This uncovered
a related problem in closeSession which is also fixed
in this CL.

bug: 64022042
Change-Id: I4e86414aa1625c35689339389391e9fa6d377b1c
Merged-In: I4e86414aa1625c35689339389391e9fa6d377b1c
rmHal.cpp
319d5f43d196ca1fc26c5d6169ae0bdd14a81d54 27-Jul-2017 Jeff Tinker <jtinker@google.com> Fix failure to check HIDL return status

Test: run Play Movies and repeat killing
android.hardware.drm@1.0-service.widevine, check
log for transaction failed messages. This uncovered
a related problem in closeSession which is also fixed
in this CL.

bug: 64022042
Change-Id: I4e86414aa1625c35689339389391e9fa6d377b1c
rmHal.cpp
33ecc4f6b0e53ea7088ff4f151323e29183070c5 04-Apr-2017 John W. Bruce <juce@google.com> Marshal Metrics

Because DRM Plugins will not be allowed to call the AMI API under
Treble, the mediadrmservice will need to marshal the metrics out of the
plugin in protobuf format and report them to the AMI API instead. This
patch implements the pulling and interpreting of metrics from DRM
Plugins.

Bug: 36497276
Test: Played Google Play Movies, verified that playback still worked and
Widevine metrics appeared in a dump of the system media metrics.
Change-Id: If07717c1b87022bc1fcdedfbc62b9193899742d5
ndroid.bp
rmHal.cpp
luginMetricsReporting.cpp
rotos/plugin_metrics.proto
6133281c9b06c1d1176eca7f07401bba1067081e 16-May-2017 Jeff Tinker <jtinker@google.com> Close all open drm sessions before destroying a plugin.

MediaDrm relies on each plugin to close its open sessions
when the plugin is destroyed. This change ensures that all
sessions will be closed even if the plugin does not do it.

b/38323088

Change-Id: I8b6e36182f3b3bc765963819101868fc46001527
rmHal.cpp
d5a416a49d5074e2966f5fe255561cbaaf31a325 16-May-2017 Chong Zhang <chz@google.com> cas: convert MediaCas to HIDL

- Remove AIDL interfaces.
- Replace usage with corresponding HIDL interfaces.
- Move MediaCasService implementation from frameworks/av
to hardware/interfaces/cas.

bug: 22804304

Change-Id: I56ab22565a43e91481ac2759ce69462bcc194046
ndroid.bp
asImpl.cpp
escramblerImpl.cpp
ediaCasDefs.cpp
idl/android/media/ICas.aidl
idl/android/media/ICasListener.aidl
idl/android/media/IDescrambler.aidl
idl/android/media/IMediaCasService.aidl
idl/android/media/MediaCas.aidl
idl/android/media/MediaDescrambler.aidl
5d057106af976cdb2a7b32b26ffb957dff0979f3 17-Jun-2017 Jeff Tinker <jtinker@google.com> Merge "Check for drmhal plugin null pointer deref" into oc-dev
am: a5f3e42433

Change-Id: Ia35d482b590c286349a4534fecdc8815ed1d1bff
8cccead54bb52abf15240707906d2d060270c8df 17-Jun-2017 Jeff Tinker <jtinker@google.com> Merge "Check for drmhal plugin null pointer deref" into oc-dev
am: a5f3e42433

Change-Id: Ie563efbf3b0558b89cf3b4d07eec457d307dff70
70367f525a7bf5be52115608d190d72756e972ea 16-Jun-2017 Jeff Tinker <jtinker@google.com> Check for drmhal plugin null pointer deref

If binderDied is invoked after a plugin is destroyed
the pointer can already be null. Also reset the init check
state after the plugin is deleted to make sure the
checks in other methods remain valid.

bug:62667492

Test: Play Movies, ExoPlayer
Change-Id: Ie12191b744331a7a435b4c64bbd1c179918553ac
rmHal.cpp
eff89fb1b548758f55336f808516b7358f832e30 02-Jun-2017 Jeff Tinker <jtinker@google.com> Merge "Allow drm plugin to be released when binder dies" into oc-dev
am: ea21ebc8b5

Change-Id: I4cc22ddfcc107ba067f4b12304cfd68e7d709b28
3e2891674ef57a74e59ca5e27f89647b3f06861b 01-Jun-2017 Jeff Tinker <jtinker@google.com> Allow drm plugin to be released when binder dies

A plugin's listener reference was preventing the plugin
from being released in binderDied, which caused
drm sessions to be kept open if an app was abnormally
terminated. Setting the plugin's listener to NULL
in binderDied resolves the problem.

Test: repeat {launch netflix app, kill <app-pid>}
Prior to this change the netflix app would always fail to
run on the second iteration and the log showed
ERROR_TOO_MANY_SESSIONS. After this change, the netflix app
can be killed and restarted without failures.

Also verified with gts tests and play movies app.

bug:37720811
Change-Id: Iceb1c23e2a1d518da85641336f017bb8b2948863
rmHal.cpp
d2b26cd85d54b5258bfd0296313c07e80bee1957 26-May-2017 Jeff Tinker <jtinker@google.com> Merge "Don't leak hwservicemanager binders" into oc-dev
am: ac1b860260

Change-Id: Ic3efcf36ca42632bb33c1f7ebb3da0b208b59bf0
593111f4460f2b2e8f541e936670e3577d45fff6 26-May-2017 Jeff Tinker <jtinker@google.com> Don't leak hwservicemanager binders

Use defaultServiceManager() instead of IServiceManager::getService()

bug:62073349
test:
repeat {launch Play Movies, play a movie, exit} while monitoring
adb shell cat /sys/kernel/debug/binder/stats |
grep -A10 '^proc <mediadrmserver PID>'
--> Make sure number of nodes is stable

Change-Id: Ibea0437ed21a9d58f3eb7ffa9461fb71d9c2b4ab
rmHal.cpp
86a0b96ddca0a657eeb1ba95ded957ba79c07c23 15-May-2017 Jeff Tinker <jtinker@google.com> Merge "Fix resource leaks in drm hal" into oc-dev
am: d004c157ba

Change-Id: Ibcb6ac2aeaf7cb3c9dd68fd25dde66667bc5eadc
f53d96676da2d672d03e35fa0894cb299ac9e318 09-May-2017 Jeff Tinker <jtinker@google.com> Fix resource leaks in drm hal

bug:36408047
test: manual testing to verify leaks are fixed
Change-Id: I3ade65eff4bbe8603fe4cf04b00ab1f3e1122f90
rmHal.cpp
8ea3bc44ea4e781928e44da339d7376f938c9e44 02-May-2017 Steven Moreland <smoreland@google.com> Remove redundant dependencies

android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: Iecab9a10a6973d01c47bffd5589d71e35614f855
(cherry picked from commit cb421ce297173e6e2f2c292a74c3e4f0459fd803)
ndroid.bp
94b8c5dfd7da80f1d9c3417486c0351e38c096e2 21-Apr-2017 Colin Cross <ccross@android.com> Convert libmediadrm to Android.bp

See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: Icfc13bb5f55fa156ef72d3cf3a327e38739d775b
Merged-In: Icfc13bb5f55fa156ef72d3cf3a327e38739d775b
(cherry picked from commit 53f2035f1d78499df816e2ef6ddb90421b0bfd72)
ndroid.bp
ndroid.mk
a07af8aea7f5d944a7ad1dcc81b9c9bcb829eead 25-Apr-2017 Jeff Tinker <jtinker@google.com> Remove DISABLE_TREBLE_DRM

This flag is obsolete now that the conversion
to treble is complete.

Change-Id: I7073d337939da43bddf99644bfe52db9baa2f605
Merged-In: I7073d337939da43bddf99644bfe52db9baa2f605
related-to-bug: 32815560
(cherry picked from commit 99a5aba027cca8d3e69e333b56168a223e053d82)
ndroid.mk
rypto.cpp
rm.cpp
9e7dd63dfff0cc967f025ea9e27a299aaa99fd69 13-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'api-review' into oc-dev

* changes:
MediaCas: combine openSession methods
MediaCas: changes to address API review comments
e309b22bff1719f1fea84b247e4b2bc4c5f09eb5 05-Apr-2017 Jeff Tinker <jtinker@google.com> Change drm/crypto service names to "default"

bug: 36371166

Test: vts drm hidl test, Play Movies

Change-Id: I942f91ab0be1f237017e88910f8d3738bf54447f
ryptoHal.cpp
rmHal.cpp
a78c1cc9773532b1f9d066ed8fa0d9414c1bb8bb 01-Apr-2017 Chong Zhang <chz@google.com> MediaCas: combine openSession methods

Combine the two openSession methods into one that doesn't take any
arguments. This gives the client more flexibility on creating
sessions efficiently. They can better decide whether to share one
session for multiple streams, or create one session per stream.

bug: 22804304

Change-Id: I9634f4dd4fc437229068103b54555cc28a818937
asImpl.cpp
idl/android/media/ICas.aidl
ef0b6b64144b6e062bbb445a6df73c365b66646d 07-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "MediaCas: fixes for playback tests" into oc-dev
b01fb48fcc755d6bfad9bc94d8c227349155e1b5 24-Mar-2017 Chong Zhang <chz@google.com> MediaCas: fixes for playback tests

- Set crypto mode to kMode_AES_CTR, since kMode_AES_CBC is not defined
on Java API, and is rejected when the sample is queued to MediaCodec.

- Wrap the plugin object in a RefBase, and hold a strong ref to it
when executing any API calls in CasImpl. This is needed because
CasImpl could be released by Java API, while MediaCodec native is
still trying to access it.

- Fix build warnings.

Tests: cts-tradefed run cts-dev --module CtsMediaTestCases --test android.media.cts.ClearKeySystemTest

It should not fail.

bug: 22804304
Change-Id: Id4ef037d57dd741d2bb22b1de3d04c8d078b69fb
asImpl.cpp
2fdf283c82b24caf4150b32b5e893322a3e3524b 02-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add Flag for Enabling 64-bit Media DRM Server" into oc-dev
b86f4b3ce066eadbfe9c2f420b16aaf2de741edb 28-Mar-2017 Rahul Frias <rfrias@google.com> Fix reclaim sessions (DO NOT MERGE)

[ Merged from master ag/2027840 ]

The SESSION_RECLAIMED event needed to be propagated to the jni native
interface.

Test: Verified by
com.google.android.media.gts.DrmSessionManagerTest#testReclaimSession
(GtsMediaTestCases) test

b/36589391

Change-Id: Ia3f17e20be19bc2e7bb88a2354d231917bfce1e8
rmHal.cpp
e9fec5451704893412c8e707940483a6bdb5f238 14-Mar-2017 John W. Bruce <juce@google.com> Add Flag for Enabling 64-bit Media DRM Server

We are ready for devices to begin migrating to a 64-bit Media DRM
Server. However, not all devices are ready to make this jump yet. A
device needs to have all of its DRM Plugins ready to run as 64-bit
before it can do this. This includes having 64-bit hardware
integrations.

So that devices can turn on 64-bit support as they get ready, I am
adding flags that can be set in a device's device.mk file. There are two
parts:

* ENABLE_MEDIADRM_64 enables building the mediadrmserver as 64-bit.

* Setting drm.64bit.enabled=true in PRODUCT_PROPERTY_OVERRIDES switches
mediadrmserver to searching for DRM Plugins in the 64-bit directory.

Test: Validated that turning on these flags enables a 64-bit
mediadrmserver that loads 64-bit DRM Plugins from the lib64
directory (after setting DISABLE_TREBLE_DRM to true to load this
code as opposed to the Legacy DRM Plugin HAL)
Bug: 36076017
Change-Id: I141cfd57ff75b40c8b0cb40a5bf1439a1ab5b766
ndroid.mk
rypto.cpp
rm.cpp
rmPluginPath.cpp
6dcab2bafd847be84c2c2230bbd04af9c45c491e 28-Mar-2017 Chong Zhang <chz@google.com> DRM: more fixes for heap base mapping -- DO NOT MERGE

Heap base for the same heap could be mapped to different values
after they go across binder to CryptoHal. So we can't use heapbase
to index the heaps.

Since each ACodec instance allocates all its shared memory buffers
from the same memory dealer, we let CryptoHal assign a sequence
number to the ACodec when it calls setHeap. In subsequent calls
to CryptoHal::decrypt, reference the heap by the seq num, and ignore
the heap base address.

Bug: 36479980
Bug: 36209723
Bug: 36660223

Test: the above bugs don't repro

Change-Id: I2f519a689a5891447385d1bf9d6e668bb3b4dbe2

(cherry-picked from bf628da1e231e2e4d6bf61f9884e120bae3f9156)
ryptoHal.cpp
Crypto.cpp
d07c92742fc5801cab8e99801f591365986acbe9 28-Mar-2017 Chong Zhang <chz@google.com> Revert "Revert "Fix decoder instantiation during playback"" -- DO NOT MERGE

This reverts commit de7268d8e20b883ec88a7ff19ad560a665373484.

Bug: 36479980
Bug: 36209723
Bug: 36660223

Change-Id: I8d83305a28dc35cee16f8f1068c90fdd0b9effff
(cherry picked from commit 6aa5c0662c86c7f7b2890577a207086eeecbd177)
ryptoHal.cpp
Crypto.cpp
93e29c0846e0f7583ae96edafbf5e8a3169711ee 22-Mar-2017 Jeff Tinker <jtinker@google.com> Merge "Revert "Fix decoder instantiation during playback""
de7268d8e20b883ec88a7ff19ad560a665373484 22-Mar-2017 Jeff Tinker <jtinker@google.com> Revert "Fix decoder instantiation during playback"

This reverts commit 33327c7f0f04bcce3f8e8ee23953f87efc423037.

Bug: 36479980
Bug: 36209723

Change-Id: I8ff9422086f5ba9ba5df60135d20b9d8bfc0be52
ryptoHal.cpp
Crypto.cpp
7ec2a45e48f6c24a5e8fa96416d8793329b79d2f 17-Mar-2017 Jeff Tinker <jtinker@google.com> Merge "Fix decoder instantiation during playback"
33327c7f0f04bcce3f8e8ee23953f87efc423037 16-Mar-2017 Jeff Tinker <jtinker@google.com> Fix decoder instantiation during playback

When a decoder is created while another decoder
is in use and the two decoders share a common
crypto instance, decryption results would become
indeterminate, which could cause the decoder to
hang. This change adds a notification to the
crypto instance so it can update state when its
ownership changes.

bug: 36209723

Test: playbacktests-debug-androidTest.apk as
described in the bug.

Change-Id: I453c260eace5543dd79a3569bf6a9592394c4113
ryptoHal.cpp
Crypto.cpp
efb7b9b26b966f6440bc8c5126c78c46090bf590 16-Mar-2017 Jeff Tinker <jtinker@google.com> Merge "Fix CTS post submit failures"
d0cb831e7f14c43359aeb080d9564185d28c7a75 15-Mar-2017 Jeff Tinker <jtinker@google.com> Fix CTS post submit failures

MediaCodecTest.android.media.cts.MediaCodecTest.testCryptoError
was failing due to incorrect error code translation introduced
by the drm hidl hal.

bug: 35137940
Change-Id: Ia5e16809872c19335b4b9c1a8ddd1e625a4781b4
ryptoHal.cpp
e424bc24ea6d3c49832436c9e400c6244f3b8c5d 15-Mar-2017 Jeff Tinker <jtinker@google.com> Merge "Fix mediaserver crash due to NULL errorDetailMessage"
9247e10531fa3128d5263e3ad605a0fecefcd2d0 14-Mar-2017 Edwin Wong <edwinwong@google.com> Check opaque size in CREATE_PLUGIN.

Check opaque size to be not greater than an abitrary 100K
and verify malloc succeeded.

Test: Play Movies & TV

Test: Netflix

Test: ANDROID_BUILD_TOP= ./android-gts/tools/gts-tradefed run gts
-m GtsMediaTestCases --test
com.google.android.media.gts.WidevineH264PlaybackTests#testL1With480P60

Test: Forcing opaque size to exceed limit and malloc to report failure;
both resulted in Netflix reporting an error and failing to play.
This is the expected result.

bug: 30202440
Change-Id: I9fdaf208471f2781ffbd656358b1bf1ef5b28ee8
Crypto.cpp
0be134af061566c7d68c0c4f868a677daf85f550 10-Mar-2017 Jeff Tinker <jtinker@google.com> Fix mediaserver crash due to NULL errorDetailMessage

bug: 33905340
Change-Id: Icad86ad066a053f4aa9ca708a3c8690a68ec1856
Crypto.cpp
6a4921ae044186bf64dab3903e8fead9499fc7f6 10-Mar-2017 Jeff Tinker <jtinker@google.com> Fix mediadrmserver not finding IServiceManager instance

bug: 36113291
Change-Id: I8d459e0edd61555a874cce68e178afd8d468e2e4
ryptoHal.cpp
rmHal.cpp
de2c37e75c6e58fd9da2e87f11e72927620c3265 03-Mar-2017 Jeff Tinker <jtinker@google.com> Merge "Load vendor-provided drm hidl hal modules"
abeb36a8c2f044772297536e70340c3b245863e4 17-Feb-2017 Jeff Tinker <jtinker@google.com> Load vendor-provided drm hidl hal modules

Prior to this change, the default legacy hal
module was explicitly referenced. This change
uses the service manager to iterate through
any hal instances so vendor-provided hals
can be loaded.

bug:34507158
Change-Id: I23bc4fdb2dc7d5254833c9a977241f1fede726a9
ndroid.mk
ryptoHal.cpp
rmHal.cpp
886aca07d2a730ba8e972478511c7bc8660ebd2a 28-Feb-2017 Chong Zhang <chz@google.com> MediaCas: move *.aidl files from frameworks/base to frameworks/av

PDK builds can't reference frameworks/base from frameworks/av.

bug: 22804304
Change-Id: I5ae534a09e15999c73d0c2d6e96755ee74ffa940
ndroid.mk
idl/android/media/ICas.aidl
idl/android/media/ICasListener.aidl
idl/android/media/IDescrambler.aidl
idl/android/media/IMediaCasService.aidl
idl/android/media/MediaCas.aidl
idl/android/media/MediaDescrambler.aidl
9dbe9a57bf0ae2494ec312d6c1b06feec20e9ec9 03-Jan-2017 Chong Zhang <chz@google.com> MediaCas: add MediaCasService

This CL adds API only without implementation.

bug: 22804304
Change-Id: Ibb5a29cc616ec0af81957b2bfe1419c482591753
ndroid.mk
asImpl.cpp
escramblerImpl.cpp
ediaCasDefs.cpp
haredLibrary.cpp
3cb5316c442d182ada75a1394e1505a017400526 16-Feb-2017 Jeff Tinker <jtinker@google.com> Support multiple codecs per crypto instance

The initial drm hidl hal implementation assumed one
codec per crypto instance, but in fact there can be
multiple codecs per crypto instance. This change
extends the drm hal to allow multiple memory heaps
per crypto plugin. It fixes the issue of mapping
memory frequently during playback.

bug:35275191

Test: manual verification with Play Movies on angler
in passthrough mode and on marlin in binderized mode.

Change-Id: Icada005f515483d7bc214b08caf6eea46ca354a7
ryptoHal.cpp
38875a41d62003ee9ad1f537106a86289fb0c437 16-Feb-2017 Edwin Wong <edwinwong@google.com> Fix isCryptoSchemeSupported's return value.

If mimeType is not defined, isCryptoSchemeSupported will always
return false.

Test: Netflix on Fugu

Test:
ANDROID_BUILD_Troid-gts/tools/gts-tradefed run gts -m GtsMediaTestCases
--test com.google.android.media.gts.MediaDrmTest#testWidevineSanity

bug: 35363342
Change-Id: I579dd6d41d17c1520404a5b45baae3f730f8245a
rmHal.cpp
c82b9c335e69b617817dace0ef64ad3df3f5080f 14-Feb-2017 Jeff Tinker <jtinker@google.com> Don't segfault on fail to create drm factory

bug:35329920
Change-Id: Id65254447d76222b78f977f6598751c5c51c87f3
rmHal.cpp
f3a591cc9d604133e2c5cae3d34322b52cd7575d 02-Feb-2017 Jeff Tinker <jtinker@google.com> Enable DRM HIDL HAL by default

Eliminate ENABLE_TREBLE since it is obsolete.
Switching back to legacy DRM is still possible
by building with DISABLE_TREBLE_DRM=true

Change-Id: I6b921050dff6162112c60df21549fc93bc46e379
ndroid.mk
rmHal.cpp
68b3d9f49e68a11af5225175dc9e60ce88819e84 07-Jan-2017 Edwin Wong <edwinwong@google.com> Pass application packagename to drm plugin.

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
ndroid.mk
rm.cpp
rmHal.cpp
Drm.cpp
a53d6553fce1818bdf87833f93633c93ad1b5915 20-Jan-2017 Jeff Tinker <jtinker@google.com> Implement client code to use Drm and Crypto HALs

This change adds DrmHal & CryptoHal classes that connect to the Treble
HAL interfaces for drm. These classes mirror the existing Drm and
Crypto classes that connect to the DrmPlugin and CryptoPlugin
interfaces. Having both allows mediadrmserver to run in either mode
while the HAL is stabilized.

The shared memory interfaces between mediaserver's ACodecBufferChannel
and ICrypto had to be reworked to use the Treble HALs. Specifically,
the shared memory path for returning decrypted buffers in the
non-secure case had to become separate instead of piggy-backing on the
source shared memory buffer. A separate shared memory destination
buffer is now allocated on the buffer channel. An abstraction for a
decrypt destination buffer was also introduced to clarify ICrypto's
decrypt method.

Tests: Playback using Play Movies and ExoPlayer works on angler
with and without the treble hal enabled.

bug: 32815560
Change-Id: I5a3dc84f99902eb8cf8eabab9ad074d307744950
ndroid.mk
rypto.cpp
ryptoHal.cpp
rmHal.cpp
Crypto.cpp
75571e4bc76bd2defd4309c7154120840396329d 08-Nov-2016 Marco Nelissen <marcone@google.com> Clean up mediadrm dependencies

Move various things around so mediadrmserver doesn't need
libstagefright and libmedia

Test: build/boot
Change-Id: I48b713cd679b992cb6ad1262c20394a9892d7027
ndroid.mk
Crypto.cpp
Drm.cpp
DrmClient.cpp
MediaDrmService.cpp
c661ae6165338fd5f0bca50a63058b4bcd6def4b 25-Oct-2016 Marco Nelissen <marcone@google.com> Remove unneeded links with dynamic libraries

Various media components were linking against dynamic libraries that weren't needed.

Test: built and booted

Change-Id: I7379506fd06d4e28e0eff0001fd073a2d3860f8e
ndroid.mk
9e27bc6c9c446814fa88bca98c1faa26c8d41fed 20-Oct-2016 Jeff Tinker <jtinker@google.com> Fix memory leak in DRM framework

The listener member of a Drm object wasn't
being released, causing memory to be leaked
every time a MediaDrm instance was created.

bug:32277525
Change-Id: I5582056fff3d20a5fd2b178bf028008d7f9ad1b4
rm.cpp
5f5ee1110dd85001b43db7637a97474acfe8d681 16-Aug-2016 Glenn Kasten <gkasten@google.com> LOCAL_CLANG := true is now the default

Test: verify that build has no failures
Change-Id: Ib249b276c6295e55eb54fa37b6d15486415dfbed
ndroid.mk
fb78341ae3a11b4c0356b393b6163f3e1258d7be 15-Sep-2016 Elliott Hughes <enh@google.com> Stop including libcore/include/ in frameworks/av.

Change-Id: I7c0ffa84071c2080b5bfe2ce9ad7e1822fe863c7
ndroid.mk
aee0669a7bdc1502a5e3d0752aaf84b0354a005e 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix clang-tidy warnings in drm."
am: e055519839

Change-Id: I99159fb0391af796445ea24265d088d20d178077
3003807fcfa96c9cbfea18d643f47108aa116cd5 25-Apr-2016 Jeff Tinker <jtinker@google.com> Remove MediaDrm stack from mediaserver

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
ndroid.mk
rypto.cpp
rm.cpp
rmSessionManager.cpp
haredLibrary.cpp