Commit graph

416 commits

Author SHA1 Message Date
Xin Li
15be13ea71 Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master
Bug: 135460123
Change-Id: Ia07db5c8afeed7fe22a2b18d867a38390f910a81
Merged-In: Ibbd540dbb5baee46360d3fe9469212cfd8f550ba
2019-09-08 13:06:54 -07:00
Steven Moreland
6684ee8c36 Merge "Remove libhwbinder/libhidltransport deps" am: 6b62c58a9a
am: 8c22c3862f

Change-Id: Iaedfceb49f81387f7deaad434613b7c9f1c502a0
2019-09-06 14:28:04 -07:00
Steven Moreland
b3a4d3832e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
2019-09-06 01:07:02 +00:00
zhangweiwei
424308c5ad Adapt change clearkey to Lazy hal
am: 0a50473369

Change-Id: I78be3e06995b60dbe9cca6fedbc93f4c26d8c770
2019-07-18 00:11:19 -07:00
zhangweiwei
0a50473369 Adapt change clearkey to Lazy hal
Exempt-From-Owner-Approval

Bug:135896867
Test: vts-tradefed run commandAndExit vts-staging-default -m VtsHalDrmV1_1Target

Change-Id: Iadba7a7afdccfe8a6299e3c0e1e03f63a58c5ca8
2019-07-17 23:24:56 +00:00
Jeff Tinker
97bf88fea2 Merge "Add status for license starting in the future" into qt-dev
am: a51399ef5f

Change-Id: I2178215a3cbb44a830690081f008c3053282fe65
2019-05-08 10:49:33 -07:00
Robert Shih
31703179a5 Add status for license starting in the future
Bug:116738851
Test: vts-tradefed run commandAndExit -m VtsHalDrmV1_2Target
Change-Id: Id5017e3ffa1fcf5aaad1815b59a425ac63f2e53e
2019-05-08 00:52:01 +00:00
Steven Moreland
99712c08cc Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I53e5bf67a0d314e1b10c0ba0c7172a7af358ddcc
2019-04-18 18:13:05 -07:00
Steven Moreland
6d494b2346 Merge "Update hidl makefiles for bpfmt" am: ff0bd741ca
am: 96f40f7b02

Change-Id: Idbf030e4993067bdb8181321bca2de00c9b6f7ef
2019-04-18 14:34:45 -07:00
Steven Moreland
1ae4615d9f Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
2019-04-17 09:38:50 -07:00
Robert Shih
c13e0f6db2 Merge "DrmHalTest.OfflineLicenseStateTest: search keySetId" 2019-03-12 20:46:45 +00:00
Robert Shih
90af5f1898 DrmHalTest.OfflineLicenseStateTest: search keySetId
Search for key set id instead of simply checking the number of total
offline licenses.

Fix LOG_TAG & remove clearkey specific comments from generic plugin
tests.

Bug: 118402843
Test: VtsHalDrmV1_2TargetTest
Change-Id: I245007317c813d5a8585d0a4ee29816b8f51ad3c
2019-03-11 18:07:33 -07:00
Robert Shih
4add15d0c9 Amend drm@1.2 vts mock errors
Bug: 118402843
Test: VtsHalDrmV1_2TargetTest
Change-Id: I05cc92d33a50b37ce12d8295cdd129d2653836d1
2019-03-08 15:19:54 -08:00
Robert Shih
295e27ee5a Merge "Add vts tests for new drm@1.2 methods" 2019-03-08 02:39:05 +00:00
Robert Shih
456f3a6447 Add vts tests for new drm@1.2 methods
Bug: 118402843
Test: VtsHalDrmV1_2TargetTest
Change-Id: If0da1538c33e0284fa6fa6dd48d56a0ce1753f02
2019-03-06 15:54:53 -08:00
Steven Moreland
87f43604b9 Merge "Update makefies: no 'types' internal" 2019-03-05 17:40:03 +00:00
Steven Moreland
7f4e21adda Merge "Update makefies: no 'types'" am: 4ee5ec1469 am: bab622f6a6
am: 7224bc9bcf

Change-Id: I434939e0770afa436c532a945542fce30a71ef7d
2019-03-04 16:05:59 -08:00
Steven Moreland
b91ac5c6a0 Update makefies: no 'types' internal
Bug: 123976090
Test: N/A
Change-Id: I84b659b163b63d39535b462a3df8a9c19f680976
2019-03-04 14:09:25 -08:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Steven Moreland
f8a47b7f01 Update makefiles.
Bug: 123976090
Test: N/A
Change-Id: I5fb6c126a090a3fe0fa4829ea9224564133dc1ae
2019-02-11 21:14:16 -08:00
Jeff Tinker
100a4eddcf Fix comment on removeOfflineLicense
bug:117570956
Change-Id: Iad1a15d81066d01387ec9addd420040155216a75
2019-01-31 09:44:26 -08:00
Jeff Tinker
08ff314594 Add securityLevel to MediaDrm isCryptoSchemeSupported API
bug:110701831
test: cts media test cases, widevine integration tests

Change-Id: I9e4679ee63b3997f7141c9b81fd6f375e862862d
2019-01-22 23:27:26 +00:00
Jeff Tinker
30c31856d5 Add support for HDCP 2.3
bug:120040804
Change-Id: Id4643829bce31131e3bc7b628737579bb597e736
2019-01-14 21:17:13 -08:00
Jeff Tinker
8378c6625e Add additional error conditions to MediaDrm
New codes are being added to handle resource
contention, lost session state, frame size too
large and insufficient security level for
decryption. Also cleans up inconsistent use of
tamper detected error where invalid state error
should have been used.

bug:111504510
bug:111505796
test: cts and gts media test cases

Change-Id: I8581aed1871d728f7af80b246d0dba28b40fa4a3
2019-01-10 17:27:59 -08:00
Peter Kalauskas
724a9fc643 Add lazy service target for drm HAL
Test: Run gts on Pixel 1/2/3, marlin_svelte, and walleye_svelte
Bug: 112386116
Change-Id: I5d86e3158794ebae967efb009a0cef8cd140ccb7
2019-01-08 09:00:23 -08:00
Chih-hung Hsieh
df66e3cb29 Merge "Fix performance-for-range-copy warnings" am: d01f7050ac am: 51e835ce22
am: 86fefab5e9

Change-Id: Ib139d710d47a7a51e24ba8ba582b252f5ff6e244
2018-12-17 14:09:52 -08:00
Chih-Hung Hsieh
65ab67312b Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I1b76a22eab100a31e77048626e48169fe7eeaf92
2018-12-17 19:57:21 +00:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
Keun Soo YIM
ff84c37bc1 pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-11-27 16:11:41 -08:00
Jeff Tinker
287ef4c733 Define offline methods in DRM HAL version 1.2
bug:117570956
bug:110838441
bug:116252891
Change-Id: Ie94d5c2174d851eb2b40dcc7bf4596af71e14176
2018-11-08 15:50:38 -08:00
Yifan Hong
438cc30a06 Merge "DRM 1.1: Add VINTF doc" am: 8ad3e78d27 am: 2524404aae
am: adf2018492

Change-Id: Iff1292a68022495c06438ba479dffc41520e2ace
2018-10-26 14:30:49 -07:00
Yifan Hong
3baef77daa DRM 1.1: Add VINTF doc
Test: none
Bug: 73556059
Bug: 111192666
Bug: 111096955
Bug: 117636317
Bug: 112150995
Fixes: 112282263

Change-Id: I361f50b5af19094c36f928939ca6d764ce59a205
2018-10-25 16:50:06 -07:00
Jeff Tinker
5c2e29de11 Fix failing drm 1.0 vts tests
The shared library path was incorrectly set based on
the drm.64bit.enabled flag. It should be set based
on whether the drm service is running as 32-bit or
64-bit.

Test: vts-tradefed run commandAndExit vts -m VtsHalDrmV1_0Target

bug:111289939
Change-Id: I388dc87bd4566211dc2901feccf1e6e1c90bfe67
Merged-In: I388dc87bd4566211dc2901feccf1e6e1c90bfe67
2018-09-13 00:39:42 +00:00
Jeff Tinker
3418cd6077 Remove spurious error log message
In change id Ie2f306bce6aec697ae584da3f55b3cf72edaa07b, a
shared memory leak was fixed using a workaround that
maintained compatibility with the frozen DRM HAL API
1.1. Unfortunately it triggered an error log message that
was no longer an error condition.  This change just removes
the log line to avoid raising undue concerns.

Change-Id: I9abe08ef5ab86b2f8589a5c1e5c5175e19ab09d2
Test: Compiles
Bug:111131173
2018-07-31 18:34:12 +00:00
Jeff Tinker
b065c9d8b7 Fix failing drm 1.0 vts tests
The shared library path was incorrectly set based on
the drm.64bit.enabled flag. It should be set based
on whether the drm service is running as 32-bit or
64-bit.

Test: vts-tradefed run commandAndExit vts -m VtsHalDrmV1_0Target

bug:111289939
Change-Id: I388dc87bd4566211dc2901feccf1e6e1c90bfe67
2018-07-20 16:36:05 -07:00
Jeff Tinker
2b46111ec8 Add more drm@1.1 VTS structure tests
Adding tests for:
 getKeyRequest_1_1
 getSecureStopIds
 releaseSecureStops
 removeSecureStop
 removeAllSecureStops

test:vts-tradefed run commandAndExit vts-staging-default -m VtsHalDrmV1_1Target
bug:73330999

Change-Id: Icd6c3e679ea674f899563a8d8e428321a7783633
2018-03-27 16:30:34 -07:00
Nathan Harold
c893754c0d Update Makefiles Missed In Previous Commits
When calling update-makefiles.sh there are
some unrelated changes that were missed in
previous commits.

Bug: 8675309
Test: compilation
Change-Id: I5bf67fbcc809de36bde1869ada7b835566a5198b
2018-03-19 16:37:46 -07:00
Zhuoyao Zhang
b83c4f2e12 Merge "Convert drm hal test to use VtsHalHidlTargetTestEnvBase" 2018-02-20 01:45:42 +00:00
Zhuoyao Zhang
cf50a32e57 Convert drm hal test to use VtsHalHidlTargetTestEnvBase
* The testEnvBase template is only used to register the testing hal.
* The service name is specifically determined by the test logic, so
  disable the feature for vts to run the test against all service
  instance (by setting HalServiceCombMode::NO_COMBINATION)

Bug: 64203181
Test: make vts
      vts-tradefed run vts -m VtsHalDrmV1_0Target
      vts-tradefed run vts -m VtsHalDrmV1_1Target

Change-Id: Ib2e005e8ccbc815067f0e9455fcd3e6c5ec151fb
2018-02-13 15:25:59 -08:00
TreeHugger Robot
1233c1046d Merge "Revert "Revert "VTS tests for fixed MediaDrm security level APIs""" 2018-02-12 17:55:50 +00:00
Jeff Tinker
6c2589f524 Revert "Revert "VTS tests for fixed MediaDrm security level APIs""
This reverts commit 6ec159b780.

Change-Id: I7e54e28c5e4b4c9f70d53d045bbfec57f7ef58c3
2018-02-11 18:58:55 +00:00
Jeff Tinker
199d60da8c Revert "Revert "Fix MediaDrm security level APIs""
This reverts commit a824afa9c4.

Change-Id: Ia8f3090454f010a507ac386767b2c2a11dce1ac4
2018-02-11 18:58:21 +00:00
Tobias Thierer
6ec159b780 Revert "VTS tests for fixed MediaDrm security level APIs"
This reverts commit 45c3855f4f.

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: Ie61888464a2ac17b1ee6f47b23f5bb84fdbfa095
2018-02-11 15:01:58 +00:00
Tobias Thierer
a824afa9c4 Revert "Fix MediaDrm security level APIs"
This reverts commit 6a5934aee3.


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: I8a1ce95ca6f48bec6c46f84a0fef7a48f975c406
2018-02-11 15:01:51 +00:00
Jeff Tinker
45c3855f4f VTS tests for fixed 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. The APIs have changed to bind the security level
assignment to openSession which clarifies the API for apps as
well as making it more natural to implement in HAL modules. This
CL updates the VTS tests to account for those changes.

bug:72831697
bug:64001680

test: VtsHalDrmV1_1TargetTest, GTS media tests
Change-Id: I2adf13f9da7726b206df6fcc82b1e2e11fc94674
2018-02-08 01:48:03 +00:00
Jeff Tinker
6a5934aee3 Fix MediaDrm security level APIs
During development of the vendor/widevine HAL module, the newly added
MediaDrm.setSecurityLevel method was found to be difficult to
implement efficiently since the security level is needed at the time
a session is opened. This CL moves the security level parameter to
openSession to resolve this problem.

bug:72831697
bug:64001680

test: VtsHalDrmV1_1TargetTest, GTS media tests
Change-Id: Id9c765131d0ee6fa85f83d098955acf603229b46
2018-02-08 01:47:45 +00:00
Adam Stone
9d127768d1 Add getMetrics test to drm vts test.
Adds test cases for the getMetrics call in the DRM 1.1 HAL clear key
implementation.

Bug: 64001680
Test: VtsHalDrmV1_1TargetTest

Change-Id: I7c292f79f7477a6a88296aa62eae02cc70e35102
2018-02-02 17:44:53 -08:00
TreeHugger Robot
635d13fff4 Merge "Add vts tests for new drm@1.1 methods" 2018-02-02 21:50:30 +00:00
Jeff Tinker
6a465fda8c Merge "Fix incorrect comment in ICryptoFactory.hal" 2018-02-02 21:38:46 +00:00
Jeff Tinker
203c8514e2 Add vts tests for new drm@1.1 methods
Test: VtsHalDrmV1_1TargetTest

Methods are for querying HDCP, security levels
and number of sessions.

Change-Id: Iaa865a0201a4c10b0c6b055aabab146dd31a2d01
2018-02-02 10:31:21 -08:00
Jeff Tinker
c707779488 Fix incorrect comment in ICryptoFactory.hal
The comment referenced drm@1.1::ICryptoPlugin which
doesn't exist.

bug:64001680
bug:33657579
Change-Id: I6905fb4b8e3e1386b999ba64a6ca5f160d1c4eff
2018-02-01 12:26:43 -08:00
Jeff Tinker
80da0aa06f 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: I53cb0671b9b775e8da16bcc61008e1700466180b
2018-01-29 14:27:29 -08:00
Adam Stone
a3face544a Merge "Added definition for getMetrics to IDrmPlugin." 2018-01-24 21:45:37 +00:00
Adam Stone
6a04d658b0 Added definition for getMetrics to IDrmPlugin.
Also added the appropriate type information for exporting metrics from a
plugin.

Bug: 64001676
Bug: 64001680

Change-Id: I9ccd4fbcf7201990e6d08c24e814e24833459a23
Test: Verified that the interface builds. No implementation, yet.
2018-01-23 16:23:30 -08:00
Rahul Frias
173d4fb93b 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: make
Change-Id: I43b7491110871332c3a79573773c441c2a4f5ccb
2018-01-23 13:33:59 -08:00
Jeff Tinker
1637e00b05 Create drm 1.1 HAL
New methods are for querying HDCP, security levels and
number of sessions

bug:64001680
bug:33657579

Change-Id: Idb3d66a805ac530221536058614e0df8460e627b
2018-01-21 16:06:49 -08:00
Jeff Tinker
5fee182384 Fix potential memory leak in default drm crypto plugin
bug:70205403

Test: manual play movies test forcing the legacy default
  widevine plugin to be used, instead of the widevine hidl
  service.

Change-Id: Icb5b234999c5bf49b31d967814e48d42d9dd767f
2018-01-05 11:18:00 -08:00
Steven Moreland
fcca4e23b7 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:43 -08:00
TreeHugger Robot
7c258c36cd Merge "Cleanup drm_hal_clearkey_test." 2017-11-15 01:02:11 +00:00
Edwin Wong
31a86d2847 Cleanup drm_hal_clearkey_test.
To stay close to the original test, the only time the test will abort is
when it encounters errors in Setup.

The following changes are applied in this CL:

- #include <openssl/aes.h> should be sorted alphabetically
- gtest macro should follow convention of ASSERT_EQ(expected, actual)
- removed unused variables: num, ecount_buf and kNotSecure
- TestQueryKeyStatus needs to call closeSession()
- moved and renamed test dependent global constants:
   e.g. k256SubSampleByteCount, k512SubSampleClearBytes and k512SubSampleEncryptedBytes
- use isOK() for checking Status::OK, e.g.
   ASSERT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk());

Test: VTS test
  adb shell /data/nativetest/VtsHalDrmV1_0TargetTest/VtsHalDrmV1_0TargetTest

bug: 68735305
Change-Id: Ic8f43b4c35644bf7223f24a531eae818e59e0f4a
2017-11-13 14:13:26 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Edwin Wong
c1512b4577 Add tests to validate key length for clearkey plugin. am: cc77a50e96 am: 01802815eb am: 36c9c34bdb
am: d29bc78ec9

Change-Id: Idbae7b29df1f71b331a13d31e47de925bceb4514
2017-11-03 05:46:59 +00:00
Edwin Wong
d29bc78ec9 Add tests to validate key length for clearkey plugin. am: cc77a50e96 am: 01802815eb
am: 36c9c34bdb

Change-Id: Ibb92aa618ceec88721ed807819d31516ab70595c
2017-11-03 05:44:56 +00:00
Edwin Wong
36c9c34bdb Add tests to validate key length for clearkey plugin. am: cc77a50e96
am: 01802815eb

Change-Id: I298891316951cc6ba5f000b796fb60c0b4f76290
2017-11-03 05:42:54 +00:00
Edwin Wong
01802815eb Add tests to validate key length for clearkey plugin.
am: cc77a50e96

Change-Id: Id61b8d76ef30a6c66edd10cd48b4ecdad795165d
2017-11-03 05:40:23 +00:00
Edwin Wong
cc77a50e96 Add tests to validate key length for clearkey plugin.
AesCtrDecryptor::decrypt() doesn't check whether the size of "key"  is
equal to 16 bytes,  which may lead to an OOB read problem in the context
of mediadrmserver. The fix is in clearkey plugin. Add tests to validate
the fix.

Test: VTS test
  adb shell /data/nativetest/VtsHalDrmV1_0TargetTest/VtsHalDrmV1_0TargetTest

bug: 63982768

Merged-In: Ife2da17e7f39d8031bc36b83c3b27ba5e9d83eb7
Change-Id: Ife2da17e7f39d8031bc36b83c3b27ba5e9d83eb7
2017-11-02 14:46:43 -07:00
Steven Moreland
1d7374c5e1 Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1 am: 6c811964a1
am: 116161d94e

Change-Id: I33643636e2511de77fdf7de57777eb67edee2e52
2017-10-11 16:39:21 +00:00
Steven Moreland
116161d94e Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1
am: 6c811964a1

Change-Id: I85ccbb4a15cd18938607f5bca4e065b9d7e0182b
2017-10-11 16:31:07 +00:00
Steven Moreland
0fff75dee1 Update for Soong java makefiles.
am: c3e80fa01e

Change-Id: Ia8835f9c95bd98a96f5fd3aff11191e7d3726fb9
2017-10-11 16:23:54 +00:00
Steven Moreland
c3e80fa01e Update for Soong java makefiles.
Test: pass
Bug: 33420795
Change-Id: Id9b1919a19b8ff682738cfb0869a479b4dbb4293
2017-10-10 23:07:20 +00:00
Steven Moreland
70bfb9d250 Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f am: b53e6ad535
am: 9a17f41f6f

Change-Id: I78d9292068b372238554fd9d35128e69f5b5f9d2
2017-10-04 21:54:11 +00:00
Steven Moreland
9a17f41f6f Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f
am: b53e6ad535

Change-Id: I23269fb7a9bdd352e670a80f390527d9eef31412
2017-10-04 21:51:00 +00:00
Steven Moreland
861651985f Merge "Update for hidl adapter module defaults."
am: 988c977079

Change-Id: I289818be1b30397391847ba1c532d1014fdbed27
2017-10-04 21:45:09 +00:00
Treehugger Robot
988c977079 Merge "Update for hidl adapter module defaults." 2017-10-04 21:36:25 +00:00
Chih-hung Hsieh
3ed04cd35d Merge "Use -Werror in hardware/interfaces"
am: 85bb01dd6b

Change-Id: I9169eb99a256f3a1db9e6f82e11fd96228d9558a
2017-10-04 20:40:30 +00:00
Steven Moreland
527fd76a0e Update for hidl adapter module defaults.
Test: pass
Change-Id: Idc6a943149a279bf17cfcfd0f2571473e53bbbbf
2017-10-04 12:47:03 -07:00
Chih-Hung Hsieh
3da5b01946 Use -Werror in hardware/interfaces
* Remove unused local variables.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I48dbbf670cc9eeff2391983788983420f8547cc9
2017-10-04 11:16:31 -07:00
Edwin Wong
0182fc2c24 Merge "Fix VtsHalDrmV1_0Target clearkey tests." into oc-mr1-dev am: d85a098767
am: cd6c66c430

Change-Id: Ie2c9939fa3b9f26cd9c0f64006fd8f9912f795cd
2017-10-04 16:47:42 +00:00
Edwin Wong
cd6c66c430 Merge "Fix VtsHalDrmV1_0Target clearkey tests." into oc-mr1-dev
am: d85a098767

Change-Id: I29d4ea563a7d855bfd07c4624faf0d89577d6515
2017-10-04 16:42:47 +00:00
Edwin Wong
48311a8c27 Fix VtsHalDrmV1_0Target clearkey tests.
1. Fix the following issues:
  - queryKeyStatus is now implemented, do not return
    ERROR_DRM_CANNOT_HANDLE anymore
  - expectedKeyRequest and knownKeyResponse should use
    '-' and '_' instead of '+' and '/' for base64Url encode;
    one uint8_t change from 0x2b to 0x2d for each vector

2. Add tests to create clearkey drm and crypto plugin using
both common pssh box format system ID and clearkey scheme
UUID.

Test: Vts test on Marlin and Taimen
  adb shell /data/nativetest/VtsHalDrmV1_0TargetTest/
  VtsHalDrmV1_0TargetTest

Test: Cts ClearKeyTest on Marlin and Taimen
  ANDROIOP= ./android-cts/tools/cts-tradefed run cts
  -m CtsMediaTestCases
  --test android.media.cts.ClearKeySystemTest

Test: ClearKey plugin unit tests
  adb shell LD_LIBRARY_PATH="/vendor/lib/mediadrm"
  /data/nativetest/ClearKeyDrmUnitTest/ClearKeyDrmUnitTest

Test: netflix and Play Movies & TV for sanity check

bug: 66327050
Change-Id: Icfbe715cf246a7c5253d5f104d0fd446618b18bd
2017-10-04 03:31:27 +00:00
Steven Moreland
91799c6cc7 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3 am: 71a193a425
am: 9fdd241905

Change-Id: I1c852fa6600fecc44d5afd1a65a5f51c43ecf71c
2017-09-27 00:02:52 +00:00
Steven Moreland
9fdd241905 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3
am: 71a193a425

Change-Id: I45ae43f07323254212532acbf0f891d11143b05f
2017-09-26 23:58:51 +00:00
Steven Moreland
f07e364ce3 Merge "Fix typo in update makefiles."
am: 9960148420

Change-Id: I949634e72f817f3a5411130e968acd8efd1d7725
2017-09-26 23:51:07 +00:00
Steven Moreland
a5299ee739 Fix typo in update makefiles.
Bug: 37518178
Test: pass
Change-Id: Ic401b3a473f15ca4c01e58b3072e19db7c31b653
2017-09-26 21:59:43 +00:00
Steven Moreland
7741c0e17b Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e am: b94d0c7290
am: 97228c0b7d

Change-Id: Ic4b459b7c1a4325453945b0b00db8f44e4e77c26
2017-09-26 13:36:09 +00:00
Steven Moreland
97228c0b7d Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e
am: b94d0c7290

Change-Id: If766cffbcc003cc0cc5eb98969b924aa918fff44
2017-09-26 12:53:13 +00:00
Steven Moreland
73949c1d7e Update makefiles for hidl adapter.
am: 26a0bb2762

Change-Id: I3a811f5cd49bd4e81e8fcd5c8e88922115812539
2017-09-25 23:14:44 +00:00
Steven Moreland
26a0bb2762 Update makefiles for hidl adapter.
Bug: 37518178
Test: manual
Change-Id: I50e999907d3c64d2b039272b823971998da64d1b
2017-09-25 18:35:56 +00:00
Jaekyun Seok
81104ae5ef Add 'vendor.' prefix to a vendor HAL service name
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.

Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: I4e8fbee791ec917a8f627a1366f4d44ec7e6febc
2017-09-12 08:01:42 +09:00
Martijn Coenen
c36e35f5a7 Merge changes from topic "fix-omx-dependencies" am: d429b1f9e7 am: 4e8e84e10b
am: 4b5313cbdf

Change-Id: Id06c5e5047a7df2fa084d6fbc2536a54919550a2
2017-09-11 21:31:04 +00:00
Martijn Coenen
4e8e84e10b Merge changes from topic "fix-omx-dependencies"
am: d429b1f9e7

Change-Id: Ic50e4bc973f6a16f0ed1a1f051dc354e69b0e39d
2017-09-11 20:53:17 +00:00
Martijn Coenen
567cbf1148 Make camera/drm helper classes available to system.
As VTS tests are considered system and link against these.

Bug: 38302533
Bug: 62523241
Test: builds
Change-Id: Iac5c872c58ec9646d6d6974aacceb930daad7e5e
2017-09-06 10:45:14 -07:00
Jiyong Park
acfcb3039a Remove dependency to libmediadrm from drm HAL
drm HAL has been using libmediadrm for android::SharedLibrary class and
android::PluginLoader class. This is a Treble violation since
libmediadrm is a framework-only library that is not available to
vendors.

To solve the problem, the two classes are copied into this directory
to form a small static library android.hardware.drm@1.0-helper.a.

Bug: 38302533
Test: mm under /hardware/interfaces/drm/1.0/default and
/hardware/interfaces/drm/1.0/vts/functional

Change-Id: I7b4e5cdb3bc815e971e0c3b7ec99ea86042e13eb
2017-09-06 10:43:26 -07:00
TreeHugger Robot
ed827b8210 Merge "Drm test static links to HAL def libs." into oc-mr1-dev 2017-08-24 21:54:47 +00:00
Tri Vo
78e8902160 Drm test static links to HAL def libs.
Bug: 64040096
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check 
--skip-preconditions --module VtsHalDrmV1_0Target
Change-Id: If23f1fda06e9188b84fc94ada0e22ca7e5b45aa9
2017-08-22 16:10:27 +00:00
Jeff Tinker
8813c2b43f Allow clearkey tests to run if no vendor modules am: 5db2e67293
am: 66812dc364

Change-Id: I6369dd486c35c842c1d0f1f151b3b468ef94ab4c
2017-08-18 04:13:04 +00:00
Jeff Tinker
0dcb34fff2 Allow clearkey tests to run if no vendor modules am: 5db2e67293
am: a538a0711e

Change-Id: Id57f15057791c88c84f268a8a69374b42561ed47
2017-08-18 04:13:04 +00:00
Jeff Tinker
66812dc364 Allow clearkey tests to run if no vendor modules
am: 5db2e67293

Change-Id: I594b8b5e9857d4a6c19d0847acf7c13949e13614
2017-08-18 04:07:04 +00:00
Jeff Tinker
a538a0711e Allow clearkey tests to run if no vendor modules
am: 5db2e67293

Change-Id: I4507467925abf52954535df5a50ae7494f6b4bac
2017-08-18 04:07:03 +00:00
Jeff Tinker
5db2e67293 Allow clearkey tests to run if no vendor modules
DRM cannot skip all tests when vendor modules are
not present. Currently even the clearkey tests are
skipping when there is no vendor lib. This can be
replicated by just pushing the DRM VTS test binary
build from master (or DR or MR) and executing the
binary without VTS. All test cases skip (including
clearkey).

This change prevents exiting when no vendor
modules are found.

Test: Push the test binary and confirm that the
clearkey tests run.

bug:64459011
Change-Id: Ic5f554d9b223d6ca4bf26f92f072254cc18f4620
2017-08-17 17:39:19 +00:00
Steven Moreland
f5da927e19 Updating all makefiles.
am: dfd8287506

Change-Id: I915b69ab3a46f25b9abeb525066d6ea89d162176
2017-08-14 21:05:52 +00:00
Steven Moreland
dfd8287506 Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Merged-In: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
Change-Id: I170fa1c4fe39f8109b1670db58ef99bb11afc0be
2017-08-14 20:25:09 +00:00
Steven Moreland
ff308ea6ba Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Change-Id: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
2017-08-11 22:58:47 +00:00
Edwin Wong
111848cbd0 Add test for additional ClearKey UUID.
Test for both ClearKey plugin UUIDs in DrmHalClearkeyFactoryTest.

Test: VTS - VtsHalDrmV1_0TargetTest

bug: 64386897
Change-Id: Id7f140518910a87efdf9eaa19ce16113e206264f
2017-08-08 15:46:15 -07:00
TreeHugger Robot
8e9eed3376 Merge "Remove unused variables." into oc-mr1-dev 2017-08-07 23:51:34 +00:00
Justin Yun
608d773ef8 Update make file for vndk enabled.
Update the Android.bp generated with hidl-gen.

Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
2017-08-04 14:12:23 +09:00
Tri Vo
8da14867cf Remove unused variables.
Test: compiles
Change-Id: Idf7631f98ad4e04f4a43e66161ba27e93d180241
2017-08-03 17:32:26 -07:00
Tri Vo
f5d136c231 Update Android.bp HIDL makefiles
Allow HAL definition libs to be static.

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
2017-08-03 00:30:01 +00:00
Edwin Wong
3b8a9ed510 Check for nullptr IMemory.
mapMemory can return a nullptr, must check for nullptr
IMemory.

Test: Play Movies (stream and pin movies)
Test: VtsHalDrmV1_0TargetTest

bug: 38386082
Change-Id: I0766380a5843415ef0260c26bd21d4b4051b20ea
2017-07-18 10:45:16 -07:00
Jiyong Park
323d172db7 Build android.hardware.drm@1.0-service with BOARD_VNDK_VERSION
Instead of relying on the global include paths, use the new headers lib
'media_plugin_headers'. Also, media/SharedLibrary.h is not used, thus deleted.

Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j android.hardware.drm@1.0-service
Change-Id: I30d8bcb6315b734cef7ad082c432da51eb33119c
2017-07-03 18:16:04 +09:00
Yahan Zhou
b95c8638c1 Merge "Fix ICryptoFactory service" into oc-dev am: 2c57b00b17
am: ef38715ba3

Change-Id: Iebc7405f6603c2838ecaa917357eb81a977f140c
2017-06-28 17:33:39 +00:00
Yahan Zhou
ef38715ba3 Merge "Fix ICryptoFactory service" into oc-dev
am: 2c57b00b17

Change-Id: I81cb1a353e63fea48f69e2fc522f70b63a1e8532
2017-06-28 17:30:40 +00:00
Yahan Zhou
bd0c79c262 Merge "Fix ICryptoFactory service" into oc-dev
am: 2c57b00b17

Change-Id: If739ab2d5a5c93ddd2bb8720305311ee49a5503d
2017-06-28 17:30:40 +00:00
Steven Moreland
c019787ce9 Use vendor variant of libstagefright_foundation.
Rather than having a lib called libstagefright_foundation and one
called libstagefright_foundation_vendor, we now just have one library
and the build system keeps track of the vendor APIs that are exposed.

Test: (sanity) boot device, watch (part of) DRM protected movie.
Change-Id: I7495be3e8f546cac1b4909108313cf61fc85b1d8
2017-06-22 17:11:09 -07:00
Yahan Zhou
ccc11be665 Fix ICryptoFactory service
BUG: 62642564
BUG: 62138343

Test: vts -m VtsHalDrmV1_0Target

Change-Id: Ic697a32b111804fc3dc78f1b6e6b77538d7eeea9
(cherry picked from commit 85a5d8855b07aec3727532983de38c324960d6d1)
2017-06-22 17:29:08 +00:00
Martijn Coenen
14adc6ebc0 Make camera/drm helper classes available to system.
As VTS tests are considered system and link against these.

Bug: 38302533
Bug: 62523241
Test: builds
Change-Id: Iac5c872c58ec9646d6d6974aacceb930daad7e5e
2017-06-20 08:57:46 -07:00
Jiyong Park
07770c78e1 Remove dependency to libmediadrm from drm HAL
drm HAL has been using libmediadrm for android::SharedLibrary class and
android::PluginLoader class. This is a Treble violation since
libmediadrm is a framework-only library that is not available to
vendors.

To solve the problem, the two classes are copied into this directory
to form a small static library android.hardware.drm@1.0-helper.a.

Bug: 38302533
Test: mm under /hardware/interfaces/drm/1.0/default and
/hardware/interfaces/drm/1.0/vts/functional

Change-Id: I7b4e5cdb3bc815e971e0c3b7ec99ea86042e13eb
2017-06-20 12:32:28 +09:00
Jiyong Park
eb845dab6e Use libstagefright_foundation_vendor
DRM HAL is a library in vendor. When BOARD_VNDK_VERSION is turned
on, any lib in vendor partition can only link against to other vendor
libs or libs marked as vendor_available:true. This lib is using
libstagefright_foundation and the lib is not available to vendors.
Instead, libstagefright_foundation_vendor is provided as a
vendor-variant of the foundation library. Thus switching to the vendor
variant.

Bug: 37462569
Test: m android.hardware.drm@1.0-impl
Change-Id: Iaee9886f9ba3643e1c19928690bad13c26ac29d7
2017-06-19 19:14:46 +00:00
Steven Moreland
7708449766 Update makefiles. (2/2) am: 76cfb84140
am: f203167814

Change-Id: I1f13401266f3c2f78c627088b09c79cd7c8d0276
2017-05-22 17:29:04 +00:00
Steven Moreland
f203167814 Update makefiles. (2/2)
am: 76cfb84140

Change-Id: I24d21438a5b2f447d2160929c6ff6e17b2b66820
2017-05-22 17:15:20 +00:00
Steven Moreland
76cfb84140 Update makefiles. (2/2)
Adds default configuration for all hals.

Bug: 38415912
Test: pass
Change-Id: Idd1f3a2b7b16ad956d31784a513e93a066cdd02e
2017-05-19 15:54:03 -07:00
Jeff Tinker
7a0385c44a Merge "Revert "Fix resource leaks in drm hal"" into oc-dev am: db15c4b6ee
am: ddd1c63569

Change-Id: Iab79f9667ed22427c11e133da60b3371723239bb
2017-05-16 19:33:23 +00:00
Jeff Tinker
ddd1c63569 Merge "Revert "Fix resource leaks in drm hal"" into oc-dev
am: db15c4b6ee

Change-Id: Ib2b3078f95637fe3c4f4f6e0bd73498374f945f5
2017-05-16 18:50:29 +00:00
Jeff Tinker
db15c4b6ee Merge "Revert "Fix resource leaks in drm hal"" into oc-dev 2017-05-16 18:25:51 +00:00
Jeff Tinker
e3b6ae14f5 Revert "Fix resource leaks in drm hal"
This caused b/38343526 which is a chase list issue, reverting for now.

This reverts commit 4e1fe736af.

Change-Id: Ib9ffcd11e575e3f05f54cbea17fda2f2eb3780b5
2017-05-16 18:21:39 +00:00
Jeff Tinker
24401aac69 Merge "Fix resource leaks in drm hal" into oc-dev am: 14b91049a7
am: fbe6eee2e5

Change-Id: Ied6aca47ea624dad2ae7778b4e70397dfaf02a4f
2017-05-15 20:14:20 +00:00
Jeff Tinker
fbe6eee2e5 Merge "Fix resource leaks in drm hal" into oc-dev
am: 14b91049a7

Change-Id: Iedefddb99f498e968a22b50fe09c589f43907ff6
2017-05-15 20:03:22 +00:00
TreeHugger Robot
14b91049a7 Merge "Fix resource leaks in drm hal" into oc-dev 2017-05-15 19:54:16 +00:00
Steven Moreland
d09cf863da Update makefiles for c++-sources and c++-headers. (2/2) am: bc71124120
am: a32ebce372

Change-Id: Ic1dd8f98e72656bc12a6e5224e541f75afb79daa
2017-05-11 01:38:14 +00:00
Steven Moreland
a32ebce372 Update makefiles for c++-sources and c++-headers. (2/2)
am: bc71124120

Change-Id: Icf36068a4d863a8520854c7a83e51f960c188e12
2017-05-11 00:48:55 +00:00
Steven Moreland
bc71124120 Update makefiles for c++-sources and c++-headers. (2/2)
Test: pass
Bug: 38174080
Change-Id: Icad451f9f9ad5f46412356a4171a8a1222f8e545
2017-05-09 19:58:43 -07:00
Jeff Tinker
4e1fe736af Fix resource leaks in drm hal
bug:36408047
test: manual tests to verify leaks are fixed
Change-Id: Idd79e99e211d81f8b3e58cf52c9b01ce9d370dc4
2017-05-09 11:24:49 -07:00
Steven Moreland
5c63b11f76 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Merged-In: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 15:29:30 -07:00
Steven Moreland
2cd0d42d72 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 10:17:28 -07:00
John W. Bruce
f3bffa8ef3 Merge "Prefix ENABLE_MEDIADRM_64 with TARGET_" into oc-dev am: 3fec5a6498
am: 3b361d8548

Change-Id: I717ef249e77045bb51a8d39fc20bf35850300f28
2017-04-29 00:01:51 +00:00
John W. Bruce
467c0db62c Prefix ENABLE_MEDIADRM_64 with TARGET_
This build-time flag should be prefixed.

Bug: 37039525
Test: Built OS
Change-Id: If6f6cd1ad2df5f000a4264cabeb7d9eb77e194ea
2017-04-27 18:50:05 -07:00
Jeff Tinker
3b65eae2fc Merge "Fix VtsHalDrmV1_0Target test failure" into oc-dev am: 1fd47b29b3
am: e126cf8cc1

Change-Id: I47ee7ecc392a88e0f4ac3ea570e5a55947be9f09
2017-04-25 22:18:06 +00:00
Jeff Tinker
a33256b811 Fix VtsHalDrmV1_0Target test failure
DrmHalVendorFactoryTest.EmptyPluginUUIDNotSupported
was failing on 64 bit builds. The test was using
an uninitialized hidl_array as the empty UUID which
was incorrect. This change initializes the array
contents to null values.

Test: drm hal tests pass

bug: 37172151
Change-Id: I0acb86921f0daceba30fa7879980ce819db64a74
2017-04-24 17:02:17 -07:00
Jeff Tinker
725771fdc4 Merge "VtsHalDrmV1_0Target test failure" into oc-dev am: c68698337c
am: bb68f35c9b

Change-Id: I05fd10acd902c70140a3acaec6096419f17159dc
2017-04-15 08:02:32 +00:00
TreeHugger Robot
c68698337c Merge "VtsHalDrmV1_0Target test failure" into oc-dev 2017-04-15 07:53:27 +00:00
Jeff Tinker
bb2223efe8 Merge "Skip tests when the drm scheme is not installed" into oc-dev am: fdde895c34
am: 09e8fb099d

Change-Id: I2f1ff0469264c3611ab6e19d3b69a3b9d9c0f659
2017-04-15 00:12:26 +00:00
Jeff Tinker
fdde895c34 Merge "Skip tests when the drm scheme is not installed" into oc-dev 2017-04-14 23:41:49 +00:00
Jeff Tinker
779678f559 VtsHalDrmV1_0Target test failure
The DrmHalVendorPluginTest.RestoreKeysClosedSession test wasn't
taking into account the policy of the asset, so both streaming
and offline assets were included in the test which is incorrect.

Test: drm vts test passes

bug:37358379
Change-Id: I41116e77a1ae306bb1a484e3714360c8553590f0
2017-04-14 16:13:19 -07:00
Ryan Campbell
d17815c4e3 Merge "Add testcases for restoreKeys API." into oc-dev am: 007d23e7cb
am: 3b1bb60add

Change-Id: I25d4d2a54ec29c1f44b5a5d020b33510939ca49b
2017-04-14 21:47:21 +00:00
TreeHugger Robot
007d23e7cb Merge "Add testcases for restoreKeys API." into oc-dev 2017-04-14 21:38:30 +00:00
Jeff Tinker
be310b2b77 Skip tests when the drm scheme is not installed
Not all drm hal implmentations will be present on every device,
but the vendor modules will be. This change allows tests to be skipped
when a drm hal implementation isn't present.

Test: drm vts tests pass with widevine on a gms
device (tests executed) and tests pass on an aosp
device (tests skipped).

Change-Id: I0b87f501a45103960193279eb5b4b2cd1c113acd
2017-04-14 13:28:32 -07:00
Iliyan Malchev
a5a5bce644 Merge "Route DRM HAL libbinder traffic to /dev/vndbinder" into oc-dev am: 580125c253
am: ef983f7ae1

Change-Id: Ic59d7d2d834814fdc3b7378155603b2537e2a357
2017-04-14 18:45:06 +00:00
Iliyan Malchev
136b5e46ec Route DRM HAL libbinder traffic to /dev/vndbinder
b/37309712
Test: marlin

Change-Id: I72c2304842bd21b5393c17be5beeeb90a74d5345
Signed-off-by: Iliyan Malchev <malchev@google.com>
2017-04-14 15:25:16 +00:00
Ryan Campbell
6799c3a5c5 Add testcases for restoreKeys API.
Add a positive and two negative test cases for the restoreKeys
function in DRM vendor plugin.

Test: vts-tradefed run commandAndExit vts -m VtsHalDrmV1_0Target
--primary-abi-only --skip-all-system-status-check
Bug: 34178477
Change-Id: Ia7f323dbd92e7281efa96b9b7d07b85123e819f4
2017-04-14 00:18:16 -07:00
Jeff Tinker
f783c20b0e Merge "DRM vts test bug fixes" into oc-dev am: ca7205fa61
am: 52ea2d0772

Change-Id: Ibe290e5ef25832b3c132c9406cc8ab238666a816
2017-04-13 18:17:56 +00:00
TreeHugger Robot
ca7205fa61 Merge "DRM vts test bug fixes" into oc-dev 2017-04-13 17:53:05 +00:00
Jeff Tinker
9dee7287e8 DRM vts test bug fixes
A session wasn't being closed in the ListenerKeysChange
test, that was causing erratic behavior on subsequent tests.
The expected return code was incorrect in the test
AttemptDecryptWithKeysRemoved.

bug:37272108
Change-Id: I11590b85c81548622359d91ebc9af75276a7b58c
2017-04-13 00:56:34 -07:00
Jeff Tinker
4c9339e2d1 Merge "Change drm/crypto service names to "default"" into oc-dev am: 8eb3a1ea59
am: 94c3beecfc

Change-Id: I004d1f2341ebac8b7876128602840772c6223197
2017-04-13 02:39:47 +00:00
TreeHugger Robot
8eb3a1ea59 Merge "Change drm/crypto service names to "default"" into oc-dev 2017-04-13 02:25:25 +00:00
Steven Moreland
d5bf55bd5a Merge changes from topic 'hidl-vendor-available' into oc-dev am: 17f0c0dde7
am: fce6b7f0d9

Change-Id: Ic95bee140e0bbbf094e89dcc7d0d99c30966786c
2017-04-12 22:54:17 +00:00
Jeff Tinker
a0b44e644a Change drm/crypto service names to "default"
bug: 36371166

Test: vts drm hidl test

Change-Id: Iae98708c4f9b58dc697fb54c9f9b67d99e7ed0cf
2017-04-11 16:25:15 -07:00
Steven Moreland
3b36a83a2e Update makefiles (2/2).
Test: pass
Change-Id: Ic7e6289c7b69785491708ce0acbb657f4c704229
2017-04-11 09:58:03 -07:00
Jeff Tinker
dc90103a3f Merge "Support binderized and passthrough vendor services" into oc-dev am: 25197f0f6f
am: 3d1a5c83ce

Change-Id: I3b5db2e5edef2b3359d529718d6feb8e94257e1d
2017-04-10 22:41:19 +00:00
TreeHugger Robot
25197f0f6f Merge "Support binderized and passthrough vendor services" into oc-dev 2017-04-10 22:14:20 +00:00
Jeff Tinker
bf064c8b31 Merge "Fix event listener timeout issues" into oc-dev am: 61fd056380
am: c7505938fa

Change-Id: I1b54ecc574169c0701d52840328eeffb266d6051
2017-04-10 18:34:22 +00:00
TreeHugger Robot
61fd056380 Merge "Fix event listener timeout issues" into oc-dev 2017-04-10 18:10:15 +00:00
Jeff Tinker
cf3916a1fd Support binderized and passthrough vendor services
Previously only the vendor service name was used
to get the drm and crypto services, which would work
either for binderized or passthrough devices, but not
both. With this change, the vendor service name is
tried first, and failing that the default passthrough
service is used.

Change-Id: I05e9552da992e8d9dbba0f8dde485406262410a9
related-to-bug:34178477
Test: drm vts test
2017-04-07 17:41:49 -07:00
TreeHugger Robot
04b10ccc41 Merge "Fix transitive includes." 2017-04-06 23:36:13 +00:00
Jeff Tinker
3da372af67 Fix event listener timeout issues
The drm vts event listener tests would hang if event
callouts failed to work as expected. Use the vts test
callback template instead.

Change-Id: I5234f5760d90c1e884badc25cd251da27c2c672d
related-to-bug:34178477
2017-04-06 16:09:02 -07:00
Steven Moreland
4e7a307730 Fix transitive includes.
Files relying on transitive include of utils/Log.h (and things that it
includes) from MQDescriptor.h

Test: pass
Merged-In: Iff316b21bef556bb026378b7f89e97ded3febef4
Change-Id: Iff316b21bef556bb026378b7f89e97ded3febef4
2017-04-06 22:04:05 +00:00
Steven Moreland
3eb7df74b8 Fix transitive includes.
Files relying on transitive include of utils/Log.h (and things that it
includes) from MQDescriptor.h

Test: pass
Change-Id: Iff316b21bef556bb026378b7f89e97ded3febef4
2017-04-06 15:01:59 -07:00
TreeHugger Robot
69571ba233 Merge "Add additional drm hal tests" into oc-dev 2017-04-06 18:21:00 +00:00
Scott Randolph
f059ae420d Merge "Use explicit .c_str() for hidl_string" into oc-dev 2017-04-06 18:01:48 +00:00
TreeHugger Robot
7ba8df9b7c Merge "Correct comment on getProvisionRequest" into oc-dev 2017-04-06 15:37:51 +00:00
John W. Bruce
fcde9ff3a0 Add Flag for Enabling 64-bit Legacy DRM Plugins
We are ready for devices to begin migrating to a 64-bit Legacy DRM
Loader. However, not all devices are ready to make this jump yet. A
device needs to have all of its Legacy 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 Legacy DRM Plugin HAL as
  64-bit.

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

Test: Validated that turning on these flags enables a 64-bit Legacy DRM
      Plugin HAL that loads 64-bit Legacy DRM Plugins from the lib64
      directory.
Bug: 36076017
Change-Id: I8d21fc7e7c0357eb6755839d41caa0f37ca20aff
2017-04-06 01:04:27 -07:00
Jeff Tinker
f20aa0c485 Add additional drm hal tests
Test: VTS tests passing

bug:34178477
Change-Id: Ie8fa5f2ad193b717b0564bb3046de8a64ccd8d85
2017-04-05 23:21:13 -07:00
Jeff Tinker
1da5b1a987 Correct comment on getProvisionRequest
There is no session ID in the parameter list.

Test: Compiles, it's a comment change

bug: 36735099
Change-Id: I0eccfcb3aa312a694b391c0b5a76e3b8425a7d36
2017-04-05 22:11:27 +00:00
TreeHugger Robot
fdfb81ebb6 Merge "Fix DRM prebuilt vendor module handling" into oc-dev 2017-04-05 18:31:02 +00:00
Jeff Tinker
f50e7a7495 Fix DRM prebuilt vendor module handling
bug:36817233
Change-Id: I93659a9901198d05fd43bf95804067a244533808
2017-04-04 22:46:37 -07:00
Scott Randolph
8997880087 Use explicit .c_str() for hidl_string
hidl_string no longer will provide an implicit cast to const char* as it
interfers with other expected behaviors of the class.  It now emulated
std::string in requiring a call to .c_str() to get the same behavior.

Bug:  36532780
Test:  Build the tree
Change-Id: I265590c7c18f425e44863df062a56b67519a932a
2017-04-04 10:53:26 -07:00
Ryan Campbell
5a07bab793 Update DRM makefile.
Change module name to VTS format.

Test: cd hardware/interfaces && mma
Bug: 34178477
Change-Id: I33490627e1254ec1b1d36ebb7778e20680005910
2017-03-31 14:55:32 -07:00
TreeHugger Robot
ebf7f3213b Merge "Add VTS tests for drm+crypto HALs" into oc-dev 2017-03-31 05:29:55 +00:00
Jeff Tinker
0ea406920a Add VTS tests for drm+crypto HALs
Tests: drm vts tests are passing

related-to-bug: 32815560

Change-Id: I2b36f27fbb42eba37f3e5a26acea0e359e60b3af
2017-03-30 20:17:18 -07:00
Jeff Tinker
fea340f1fe Fix getKeyRequest legacy HAL returning invalid status
bug: 36006198

Test: drm hal vts test
Change-Id: Ie3125b4459add4fd30dc418f92ab0f51d8fcc73b
2017-03-30 16:00:12 -07:00
Steven Moreland
561b602a99 Update makefiles for hwtypes.h
Test: pass
Change-Id: I8e17eb8fec5d2f04c526476a866c8dd54ccb556c
2017-03-28 15:18:20 +00:00
Edwin Wong
c7170174d4 Check registerPassthroughServiceImplementation return status
Should abort program if registerPassthroughServiceImplementation returns
something other than OK.

Test: Play Movies & TV in non-binderized mode.

bug: 34640335
Change-Id: I94be98e7ae66cdb777a7d182123c8692aef915b7
2017-03-16 09:43:29 -07:00
Jeff Tinker
e5fbc46ef2 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: Ibd02425a55194f3cb0acc0e53f90b156023fb1ab
2017-03-15 20:35:37 +00:00
TreeHugger Robot
a652f5fc1d Merge "Remove warning from DrmFactory.cpp" 2017-03-08 18:28:29 +00:00
Steven Moreland
542f434dc2 Remove warning from DrmFactory.cpp
Test: pass
Change-Id: Ie5d37a257bfb1f4f5d9173bbe41e734161941954
2017-03-08 08:34:00 -08:00
Jeff Tinker
7e0a4e54ad Allow drm hal implementations to not require provisioning
Not all drm schemes require provisioning. This change
updates the documentation to explicitly support it.

bug:36007160
Change-Id: Ia4dc471314d2cce92ce8d69258bf1d16d5104302
2017-03-07 02:55:27 +00:00
Rahul Frias
abd4e11c9d Correct reporting of errors in MediaCrypto
Legacy error codes need to be converted into new Status values before
being reported. Decryption errors (that were negative) were changed to
absolute values. This caused their translation to new Status values to
fail.

b/35634335

Test: Verified with GtsExoPlayerTestCases. Some failures, but those
      are unrelated to this CL and will be addressed separately.

Change-Id: I995cac33cb2725d02b0f1a3922e522ce07a9d1be
2017-02-28 20:56:13 +00:00
Rahul Frias
89437fbdd9 Correct propagation of asynchonous events
The legacy plugin listener was not set when used in
passthrough mode in Treble. This caused events (session renewal,
key expired etc) not to be propagated to the app.

b/35375500

Test: In progress

Change-Id: I7d74b3320c82e22f67d3c804ee93f9b9791080b2
2017-02-27 15:07:34 -08:00
Steven Moreland
7e73d5b908 Remove viral dependency on libhwbinder. (2/2)
find hardware/interfaces -name Android.mk -exec sed -i -e '/libhwbinder
\\/d' {} \;
find hardware/interfaces -name Android.bp -exec sed -i -e
'/"libhwbinder"/d' {} \;
./hardware/interfaces/update-makefiles.sh

Note, automotive has some actual dependencies on libhwbinder, filed
b/35758626 for this.

Test: everything links
Test: (sanity) booted marlin on internal master with these changes
Bug: 35710429
Change-Id: I6d0726c8130d00684b978efbdd48e3ae396f12e5
2017-02-24 12:18:01 -08:00
Jeff Tinker
e376fbd572 Merge "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." 2017-02-17 23:30:16 +00:00
Jeff Tinker
0b3f41ec8d 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
and in binderized mode on marlin

Change-Id: I0ec36856248623d2ad8acb8ce9873e9274883a40
2017-02-17 19:51:03 +00:00
Jeff Tinker
9a33bb2b25 Revert "Enable loading of treble-based plugins"
bug:35329920

Tests: Verfied playback on Ryu with Play Movies in combination with
ag/1907708, ag/1909159

This reverts commit fbf3650370.

Change-Id: I4a35a329b24e4cd9efcff4fe84e9d8901c714d57
2017-02-14 21:42:16 +00:00
Steven Moreland
a0da1a1c3d Move hidl shims to the vendor partition. (2/2)
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.

Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
2017-02-13 15:03:41 -08:00
Tri Vo
85120c9490 Update makefiles to use filgroup syntax.
Test: mmma hardware/interfaces
Change-Id: I9f4457c78b7820c242d46359f0debe05d1b3e482
2017-02-10 12:45:19 -08:00
Tri Vo
ce608bec74 Migrate driver/profiler to test/vts-testcase/hal.
Bug: 34893894
Test: mmma hardware/interfaces

Change-Id: Ic72716577a5f93700c5056986aff55a76b170b5d
2017-02-07 19:13:28 -08:00
Zhuoyao Zhang
e9b43bbe2d Update Andriod.bp for hals.
* Add driver/profiler build rule for all hals.

Test: mma
Change-Id: I98325f7af14fec7dd1bb64b1668de8c7c20ace92
2017-02-03 10:03:01 -08:00
Ryan Campbell
18b1d14339 Merge "Update DRM makefile." 2017-01-31 21:31:53 +00:00
Jeff Tinker
45548ea846 Add vendor-requested parameter to createPlugin
A feature in O requires a small change to the
drm HAL: adding a parameter to the createPlugin
method in the DrmFactory.

bug:31306973
Change-Id: Iab0f7ee58103b357f10cf05ea7986a8fc01eebf6
2017-01-31 05:10:47 +00:00
Ryan Campbell
cbcec7efe5 Update DRM makefile.
Test: cd hardware/interfaces && mma
Bug: 34801248
Change-Id: I2b3f90863c01ad4a8808a96800d8107123420888
2017-01-30 10:12:46 -08:00
Jeff Tinker
d4c3cbcc38 Merge "Enable loading of treble-based plugins" 2017-01-28 01:22:19 +00:00
Jeff Tinker
fbf3650370 Enable loading of treble-based plugins
Test: gtests passing

bug: 34507158
Change-Id: I712dea8e211e83b36cb103d913405521d55123f5
2017-01-26 14:20:24 -08:00
Jeff Tinker
dc8e2d0620 Don't deref a NULL shared buffer base
bug:34624618
Change-Id: I5caee20a944d0c7b5d30f8abdbd8734507914a3a
2017-01-25 17:33:30 +00:00
Jeff Tinker
972a3e3292 Add LOG_TAGs to drm hal default modules
Change-Id: I1267205999b7cc660a6c908f0d183e43277a9c71
2017-01-23 16:02:27 -08:00
Jeff Tinker
da002fe641 Reorganize drm hal modules
Previously the drm and crypto plugins were separate hals.
This implied a separation of implementation libraries which
causes problems for some drm schemes. The reorganization
combines the hals into a single interface under drm.

Tests: basic gtests passing

Change-Id: I5cde6ff9f60625a0219731c4dbfcaefbd9f27f88
related-to-bug: 32815560
2017-01-20 10:48:50 -08:00
Jeff Tinker
f21cdafdaf Update shared memory access method in the crypto plugin hal
Required for functionality and performance

Test: gtests passing

bug:32815560
bug:34234561
Change-Id: I712bc4c332ff5721cf1369357d456b364d84967d
2017-01-19 17:16:38 -08:00
Jeff Tinker
6fdbe86350 Add missing 'offset' parameter to decrypt.
Required for functionality

Test: gtests passing

Change-Id: I9e368c146092512dfa42230be0e05848044d2df5
related-to-bug: 32815560
2017-01-19 08:21:12 +00:00
Jeff Tinker
d59d36252e Implement services for crypto+drm HALs
Test: service runs, basic gtests pass

bug:32815560
Change-Id: I9642f20d11805c56c46ddede64e776df5314f089
2017-01-19 05:33:21 +00:00
Jeff Tinker
01f0a5a0dd Replace ICryptoPlugin's detailed error message
It had been removed since it didn't appear to be needed,
but was found to be necessary for functionality.

Test: gtests pass

Change-Id: Ib716a04218e8d5c81f5d7889a53dfa17beccecef
related-to-bug: 32815560
2017-01-19 04:05:57 +00:00
Yifan Hong
a18049ad13 Bp/nFoo -> Bp/nHwFoo.
Test: mma
Bug: 33554989
Change-Id: I4b3f852d20fdfc49f2da671dd3c12d618ffb4140
2017-01-11 13:14:59 -08:00
Jeff Tinker
b3a16724fe Changes to drm and crypto HALs as part of client implementation
bug: 32815560
Change-Id: Iced6218014dfc921c94e38db8f7f634ab75b7a75
2017-01-03 12:33:42 -08:00
Jeff Tinker
65b7ef02d9 Remove superfluous type parameter to PluginLoader
Also cleaned up some comments

bug:32815560

Change-Id: Iabf946f811b59613c849c9cd7941196370706e0f
2016-12-28 18:57:34 -08:00
Jeff Tinker
b075caa3b9 drm+crypto HAL default implementation
Test: compiles, links

bug:32815560
Change-Id: I49595734aca46c818bb3685934373a627a98a6ed
2016-12-21 23:54:46 -08:00
Jeff Tinker
35594ec178 Follow up on "Treble HAL interfaces for drm+crypto"
Responding to post-submit feedback on previous CL.

b/32815560

Change-Id: Iaf412dc5c39c0595a0486a1220caf4e1c844e824
Tests: Make completes successfully
2016-12-20 13:13:58 -08:00
Yifan Hong
f35ee3b192 Revert "Revert "Update makefiles for Java package path.""
This reverts commit a8789f27cb.

Change-Id: I69980b580a556188ba868bb096ae1590b01759f5
2016-12-13 22:20:16 +00:00
Yifan Hong
a8789f27cb Revert "Update makefiles for Java package path."
This reverts commit ab0792ccdc.

Change-Id: I47fc272d9fa8875e3d7ccb10cb748c738fbf8135
2016-12-13 22:18:34 +00:00
Yifan Hong
ab0792ccdc Update makefiles for Java package path.
use V1_0 instead of 1.0.

Bug: 33554192

Test: hidl_test_java
Change-Id: Ic2d95265df10914a60a5bb743d75e839948838c3
2016-12-13 11:32:56 -08:00
Jeff Tinker
53b52fe81f Treble HAL interfaces for drm+crypto
b/32815560

Tests: Make completes successfully

Change-Id: Id65cfef95094ccd9a9e95fa567651f94b66aaa51
2016-12-09 19:29:45 -08:00