Commit Graph

21 Commits

Author SHA1 Message Date
Treehugger Robot
0ff72a9189 Merge "CAS AIDL: Start thread pool for default service" into main 2023-11-10 04:14:03 +00:00
Venkatarama Avadhani
a6710298c8 CAS AIDL: Start thread pool for default service
Add missing call to start the thread pool for the default CAS AIDL
service.

Bug: 301369982
Test: atest android.media.misc.cts.MediaCasTest#testClearKeyApis
Change-Id: I6c0572f8573627a817ac5a429bd6800a95687380
2023-11-07 20:51:37 +05:30
Pawan Wagh
19c9d5b607 Remove vendor from android.hardware.cas-service_fuzzer
Fuzzer fails to get defaultServiceManager due to hermiticity issues
when vendor is enabled in cc_fuzz which uses vendor variant of
libbinder under libbinder_ndk.

Test: m android.hardware.cas-service_fuzzer && adb sync data && adb
shell
/data/fuzz/x86_64/android.hardware.cas-service_fuzzer/android.hardware.cas-service_fuzzer
-runs=10000
Bug: 301768467

Change-Id: Ief27f75f4330973fc194c77ea36cdbb826f35807
2023-10-26 23:32:23 +00:00
Jooyung Han
9e73b2047a Use explicit requirements from APEX
Previously, CAS APEX used ":sphal" and `android_load_sphal_library` to
open plugins from /vendor/lib/mediacas. It was a workaround because
there's no way to limit the scope to /vendor/lib/mediacas. And CAS
plugins are not SPHAL libraries.

Now, the APEX uses more explicit requirements: ":mediacas", which
limitss the scope to /vendor/lib/mediacas.

Bug: 298542407
Test: atest CtsMediaMiscTestCases:MediaCasTest
Change-Id: Id91a87e0f6ef8a761e37cabed7da8b9fed0591c2
2023-10-12 16:37:03 +09:00
Jooyung Han
5a3d588442 Revert^2 "Add CAS HAL APEX"
8b19286ce3

This relands the CAS HAL APEX.

Bug: 297467514
Test: atest CtsMediaMiscTestCases:MediaCasTest
Change-Id: I741d059688ac65f42bed45e068cd00ccc5d631f5
2023-09-15 00:17:30 +09:00
Sebastian Pickl
38a85e778c Merge "Revert "Add CAS HAL APEX"" into main 2023-09-14 12:26:38 +00:00
Sebastian Pickl
8b19286ce3 Revert "Add CAS HAL APEX"
Revert submission 2742398-cas-apex

Reason for revert: culprit for flake b/300311777, verified with go/abtd with 15 runs to make sure the flake is gone https://android-build.googleplex.com/builds/abtd/run/L46500000963034919

Bug:300311777

Reverted changes: /q/submissionid:2742398-cas-apex

Change-Id: Ia13d761d7df501fb30170a69462427198bcf924d
2023-09-14 12:25:33 +00:00
Tomasz Wasilczyk
11a55db7c9 Don't depend on String8 cast to C string [cas]
Bug: 295394788
Test: m checkbuild
Change-Id: I82c94f0a720957c443f92b030214c6d2c47bf009
2023-09-13 04:24:54 +00:00
Jooyung Han
4fb30ff596 Add CAS HAL APEX
The new apex replaces android.hardware.cas-service.example.

Bug: 297467514
Test: atest CtsMediaMiscTestCases:MediaCasTest
Change-Id: I802ab0fe8ffbefd6c1ff9343f6046701fa94029f
2023-09-06 17:18:01 +09:00
Tomasz Wasilczyk
f23e19a533 Merge "Use String8/16 c_str [cas]" into main 2023-08-30 04:29:16 +00:00
Treehugger Robot
24c2867516 Merge "Don't use String8 path functions" into main 2023-08-25 22:44:37 +00:00
Tomasz Wasilczyk
3e74f0b928 Use String8/16 c_str [cas]
Bug: 295394788
Test: make checkbuild
Change-Id: I1faccac8711d5cccee70443548940d99804c7c2a
2023-08-25 19:41:37 +00:00
Tomasz Wasilczyk
38836b884b Migrate from android::String isEmpty to empty
This empty method is different from the old one - it aligns with
std::string definition.

Bug: 295394788
Test: make checkbuild
Change-Id: I98dad222b149e6052b7dc63c477d84c9eb011dd3
2023-08-24 18:49:22 +00:00
Tomasz Wasilczyk
7c52bb1e7f Don't use String8 path functions
Ideally, we should migrate to std::filesystem, but libc++fs is not
available for vendor binaries until b/175635923 lands.

Bug: 295394788
Test: m checkbuild
Change-Id: If285034d7b343531082d0176ab26bf51390714d0
2023-08-23 15:10:11 +00:00
Venkatarama Avadhani
90e664dfa6 CAS: Add SYS_NICE Capability
Add SYS_NICE capability to the CAS services. This will enable the
service to set its priority.

Bug: 286011513
Test: Build
Change-Id: I5cd58a3a9db53fcc004557a8e9f509ebd6291c2d
2023-08-08 15:35:08 +05:30
Garfield Tan
a68b2696e8 Let the lazy CAS HAL to override the regular one
Some devices may choose to use the lazy version of CAS HAL than the
regular one, but the default one is added to pretty much all devices in
the commit 4f5534b0d381a0968e81ee20e81b791aebe5493d in the
platform/build project. Adding the lazy version will duplicate the
implementation of CAS HAL.

This is what is done in the 1.2 HIDL implementation.

Bug: 291344726
Test: Only the lazy implementation is installed to devices that require
the lazy version.

Change-Id: I88ee8d2fa4c27720817e65e5c41ffc74d6b2d61f
2023-07-17 14:58:48 -07:00
Garfield Tan
7777a4be12 Unmark executable bits from CAS AIDL HAL impl
None of these files are executable. The .rc and .xml files shouldn't be
installed to the device image as executables either.

Bug: None
Test: Files installed on the device aren't executables anymore.
Change-Id: Id15ecc7febb56ea108155fcbd338efeb8885709a
2023-07-17 14:58:47 -07:00
Venkatarama Avadhani
3e2719e85c CAS: Move OWNERS file from default to base folder
Bug: None
Test: None
Change-Id: I1d59460821ab23ba20fb88dc4072bb3a0bf055b4
2023-02-07 19:31:26 +00:00
Venkatarama Avadhani
9bd3427c7d CAS: Add openSession with no params
Add method to open a session with no arguments.

Bug: 266169861
Test: atest CtsMediaMiscTestCases

Change-Id: I912de02407716c9a5bcd28dabfa8eb8f45aef727
2023-02-03 22:33:36 +00:00
Shraddha Basantwani
09edb5748d CAS: Fix memory leak in FactoryLoader
Bug: 258638318
Bug: 262899644
Test: android.hardware.cas-service_fuzzer
Change-Id: Iff8a4e34a11f5a96e6c65cd84ee55f1712711670
2023-01-31 15:46:57 +05:30
Shraddha Basantwani
6545b4e343 Add default implementation for CAS AIDL
Bug: 230377377, 227673974
Test: manual
Change-Id: I85015dd6e1a69ff9b57f832f5b1cd01fb65dda25
2022-10-21 14:26:46 +05:30