Age | Commit message (Collapse) | Author |
|
For reasons unrelated to HidlInstrumentor, -Wpadded is enabled in
libhidl_test for this class. However, due to (a bug in?) -Wpadded not
looking into protected fields, this error is only caught in certain
versions of clang or in clang tidy.
Bug: 178056347
Test: static_asserting size of this struct (it's unfortunately exported
and used by HIDL generated libs which freeze the ABI), and manually
checking offsets of these fields. This was also verified locally by
temporarily opening up visibility, such that compiling libhidl_test
checks for padding here.
Change-Id: I7e883f74b2ecba1bb5100723e114bd48245c6b7a
|
|
We don't want to be returning a mutable reference to the grantors. Since
this function isn't being used anywhere, it is being removed.
Fixes: 162465295
Test: m && atest fmq_test
Change-Id: Ib5e519d100706c2443da99b85b27aa8dcb543d35
|
|
Bug: 166295507
Merged-In: I131d903c43aaaf1ba934933ac89aba5e09a34269
Change-Id: I6a8acb690e153838070951963797f69d92e58c1e
|
|
The definition is being moved to MQDescriptorBase in libfmq.
Test: atest fmq_unit_tests &&
system/tools/hidl/tests/run_all_device_tests.sh && m -j64
Bug: 142326204
Change-Id: I40469c76cdd544b496a284219190424ed7e049d9
|
|
Move the defintion of MQFlavor to libfmq to share it.
Test: atest fmq_unit_tests && m -j128
Bug: 142326204
Change-Id: Ib8427ded3f1d70d7aed96070311248ac6cb571c9
|
|
This reverts commit 91b5e43e2274dadeb22c393b56f01f022e5c888d.
-- copied from original --
libhidlbase supports API level(29)
libhidlbase searches impl libs of passthrough HALs from various paths
including VNDK-sp /hw. VNDK-sp path differs in R and Q.
Exempt-From-Owner-Approval: re-landing in the internal branch
Bug: 158564319
Test: install R-built media apex on Q device
atest android.media.cts.MediaDrmClearkeyTest
=> see logcat if there's an error to load libmpeg2extractor
Change-Id: I131d903c43aaaf1ba934933ac89aba5e09a34269
|
|
This reverts commit 544d9b595478a177dd6ae864f9ced25c003530d1.
Reason for revert: b/161492170
Exempt-From-Owner-Approval: revert to fix a broken test
Change-Id: If2d17d59015ed737112dea78aaa525f053f3ca56
|
|
libhidlbase searches impl libs of passthrough HALs from various paths
including VNDK-sp /hw. VNDK-sp path differs in R and Q.
Bug: 158564319
Test: install R-built media apex on Q device
atest android.media.cts.MediaDrmClearkeyTest
=> see logcat if there's an error to load libmpeg2extractor
Change-Id: I2c9be242d9c81d92ccda81f5d09abcb5ccdcf87b
|
|
Fixes "implicit conversion loses integer precision: 'size_t' (aka
'unsigned long') to 'uint32_t' (aka 'unsigned int')".
Test: m
Bug: 129481165
Change-Id: I06830fb7439b7f9f44e4ceb506628d117c49c739
|
|
Test: m libhidl
Bug: 129481165
Change-Id: Ic9a6d974f0ad59c42c052d1cb02001407f4929a3
|
|
|
|
This type value initializes primitives these days, but these comments
were written when it didn't.
Fixes: 153745259
Test: n/A
Change-Id: I0970e8fb830e94f5ca26f70291d127e85b7dbd59
|
|
Even though the old VNDK path(/system/lib/vndk-sp-<ver>) is still valid
to use (for older prebuilts), it is merely a symbolic link to VNDK APEX.
As a migration effort to the new VNDK path, this change updates the VNDK
path from /system/lib/vndk-sp-<ver> to /apex/com.android.vndk.v<ver>/lib
Bug: 151635798
Test: atest --test-mapping .
Test: device boots with Q vendor
Merged-In: I7260f1a969e4c7f6923d09382eeb2efec7b6c2cd
Change-Id: I7260f1a969e4c7f6923d09382eeb2efec7b6c2cd
(cherry picked from commit 0268c937f268b7a6cd50571b35455adf0cf7b007)
|
|
To my knowledge, no one has hit this, but this type (probably unwisely)
allows itself to be empty w/ null buffer or empty w/ non-null buffer
(e.g. via setExternal/resize(0)). So, releaseData should be checking for
null buffer, not size 0.
Bug: 152911913
Test: libhidl_test
Change-Id: I5792b5aac5b3278333a75ff84f09d3d5e5b3a8a2
|
|
This allows instantiations like
::testing::ValuesIn(hidl_enum_range<Foo>()).
Test: make
Test: atest VtsHalDumpstateV1_1TargetTest
Change-Id: I1313a67c152ff830ca5ab9a7285b6e9fcb539444
|
|
Now that the libraries are combined, also combine their build so that it
is clearer what is going on.
Bug: N/A
Test: N/A
Change-Id: I0db446a99f4ff321107b78c16733b3a4abbe62a1
|
|
Bug: 144534032
Test: TH runs libhidl_test
Change-Id: I164ac95687c6f7d07ab3d17b32e1238c9071f4d6
|
|
elsk@ noticed we were missing this case.
Bug: N/A
Test: added test fails w/o fix, but now succeeds
Change-Id: I2984e7b680144a7fe0d243e45be80461149176c8
|
|
The motivation of this is for quickly running unit tests of HAL
implementations on host. Before, you would have to abstract away
HIDL stuff, but now, you can just call a class that inherits from
HIDL stuff directly.
Currently, there is no binder or passthrough support on host though.
This is only for unit tests of C++ classes.
Bug: 124524556
Test: libhidl_test on host
Change-Id: I922060e48406ca196fbf864e549c05f5e1113d62
|
|
There was an extraneous set to make this true. I had left it alone while
making other changes just in case, but it should be safe to remove it
now.
Bug: N/A
Test: TH runs libhidl_test
Change-Id: I07122ac8202a69bd376c3b020735eddecaee8190
|
|
- Test that pads are zero (for future proofing, also ran tests
on original implementation and bugfix).
- Use -Wpadded so that compiler guarantees there aren't padding
bits hiding elsewhere (there aren't)
Bug: 131356202
Test: libhidl_test
(without fixes, with fixes, and with this CL)
Change-Id: Ib52a16015b0393c104cd984376328cb0da888b03
Merged-In: Ib52a16015b0393c104cd984376328cb0da888b03
|
|
Bug: 135686713
Test: try using these elsewhere
Change-Id: I64a85f744230536a0c362138ad1aa71f19f58c01
|
|
am: 0d2a0dab0e
Change-Id: I214fe36fa0f20f09233c71de0ae235956b103ef2
|
|
|
|
Also fixed formatting of nearby line.
Bug: 135918744
Test: atest libhidl_test
Change-Id: I3743115bdacdbf56b6e68d57cf7a8f38f99cb182
|
|
Bug: 136196576
Change-Id: Ib10a613e02514ef569c6207a83f4a9144f067865
|
|
am: 06ef1e772a
Change-Id: Id3ea3f7b7b38e568da9c00b3dff34727693600c0
|
|
To avoid extra copies. Doing this also requires adding move
constructors and move assignment operators to hidl_array.
Bug: 135207394
Test: libhidl_test
Test: hidl_test
Test: reduces image size on aosp_walleye
$ cat installed-files-before.txt | awk '{s+=$1}END{print s}'
1135438223
$ cat installed-files-after.txt | awk '{s+=$1}END{print s}'
1135434327
Change-Id: I231f5c9cc959b605e6f102ff7217f338c95d5d5e
|
|
am: a46371d5b3
Change-Id: Id851f2f0de31ac26f89e3b058b4d412678f1c0e5
|
|
For performance/memory. HIDL transport split at this level will be
de-emphasized moving forward as it is not necessary.
Bug: 134961554
Test: librank
Change-Id: I66183294232bdd0616a943d6cdd08254732ffb45
|
|
am: 83d1790b25
Change-Id: I2183ead0d214500ef2c18c2924d923ea5f9490c0
|
|
Add 'onValueRetrieval' error which explicitly talks about the error
being while retrieving a value (since 'assertOk' was publically
exposed, it no longer makes sense to have a specific error).
assertOk is now also used in ~return_status and contains even more
information about how to interpret the error.
Bug: many
Test: TH
Change-Id: I80a7ec2ae42b7980a0a84fc760d5b27b17f293db
|
|
Bug: 131356202
Test: manually check padding in structs allocated in these arrays
Test: libhwbinder_benchmark, well within variance (this test allocates
arrays).
Before:
---------------------------------------------------------------------
Benchmark Time CPU Iterations
---------------------------------------------------------------------
BM_sendVec_binderize/4 34935 ns 15081 ns 36091
BM_sendVec_binderize/8 39140 ns 16846 ns 38865
BM_sendVec_binderize/16 36495 ns 15833 ns 44182
BM_sendVec_binderize/32 39785 ns 17182 ns 38870
BM_sendVec_binderize/64 35647 ns 15466 ns 38215
BM_sendVec_binderize/128 39145 ns 16873 ns 44856
BM_sendVec_binderize/256 38836 ns 16801 ns 41596
BM_sendVec_binderize/512 41014 ns 17831 ns 40161
BM_sendVec_binderize/1024 37534 ns 16270 ns 41794
BM_sendVec_binderize/2048 37662 ns 16471 ns 42331
BM_sendVec_binderize/4096 38551 ns 16809 ns 35635
BM_sendVec_binderize/8192 36139 ns 15865 ns 42185
BM_sendVec_binderize/16384 51743 ns 22600 ns 31556
BM_sendVec_binderize/32768 46644 ns 20616 ns 30220
BM_sendVec_binderize/65536 68763 ns 30412 ns 25429
After:
---------------------------------------------------------------------
Benchmark Time CPU Iterations
---------------------------------------------------------------------
BM_sendVec_binderize/4 39549 ns 17214 ns 35193
BM_sendVec_binderize/8 38786 ns 16822 ns 37402
BM_sendVec_binderize/16 37787 ns 16492 ns 37100
BM_sendVec_binderize/32 40796 ns 17567 ns 36399
BM_sendVec_binderize/64 41024 ns 17797 ns 45328
BM_sendVec_binderize/128 36169 ns 15707 ns 39602
BM_sendVec_binderize/256 37136 ns 16094 ns 47081
BM_sendVec_binderize/512 37998 ns 16443 ns 48487
BM_sendVec_binderize/1024 35190 ns 15318 ns 40091
BM_sendVec_binderize/2048 37665 ns 16399 ns 39498
BM_sendVec_binderize/4096 45963 ns 19877 ns 36884
BM_sendVec_binderize/8192 40075 ns 17620 ns 34013
BM_sendVec_binderize/16384 46224 ns 20315 ns 34384
BM_sendVec_binderize/32768 49775 ns 21994 ns 35334
BM_sendVec_binderize/65536 60181 ns 27238 ns 22205
Change-Id: Ica6c55e7346b9e1ba91192472e2b229cb786802c
Merged-In: Ica6c55e7346b9e1ba91192472e2b229cb786802c
(cherry picked from commit 03b0bf2f20bccc3d6c005c41a866fc35a68458d5)
|
|
hidl_pointer - already zero initialized
hidl_string - now memset to 0
hidl_array - has no pad to initialize, default initialize since we
now expect structs to be default initialized to sane values.
hidl_vec - now memset to 0
hidl_memory - has three aligned(8) items which are always set
hidl_version - unused, but has two uint16_t entries
Zero-init HIDL core types (hidl_handle).
Has 7 padded bits at the end.
Since they are passed across processes.
Bug: 131356202
Test: print out values
Change-Id: I3979232879bb437d17d3a6f6013b53b2951a2138
Merged-In: I56bacf9ca7ac51d73449d11883c6224e214b8773
Merged-In: I8dd52e196e1585028d91d97f00861021c21ec09c
(cherry picked from commit aa79ac59c8907ea608392488f2d24889cf6778c8)
|
|
Note: this only adds value_type to single dimensional hidl_array since
the multi-dimensional hidl_array only has a view returned from
operator=. Waiting for more usecases before creating a value_type there.
Bug: 130662871
Test: N/A
Change-Id: Ie693199271267c239e657e99511ea2605d062187
Merged-In: Ie693199271267c239e657e99511ea2605d062187
|
|
Note: this only adds value_type to single dimensional hidl_array since
the multi-dimensional hidl_array only has a view returned from
operator=. Waiting for more usecases before creating a value_type there.
Bug: 130662871
Test: N/A
Change-Id: Ie693199271267c239e657e99511ea2605d062187
Merged-In: Ie693199271267c239e657e99511ea2605d062187
|
|
Bug: 131356202
Test: manually check padding in structs allocated in these arrays
Test: libhwbinder_benchmark, well within variance (this test allocates
arrays).
Before:
---------------------------------------------------------------------
Benchmark Time CPU Iterations
---------------------------------------------------------------------
BM_sendVec_binderize/4 34935 ns 15081 ns 36091
BM_sendVec_binderize/8 39140 ns 16846 ns 38865
BM_sendVec_binderize/16 36495 ns 15833 ns 44182
BM_sendVec_binderize/32 39785 ns 17182 ns 38870
BM_sendVec_binderize/64 35647 ns 15466 ns 38215
BM_sendVec_binderize/128 39145 ns 16873 ns 44856
BM_sendVec_binderize/256 38836 ns 16801 ns 41596
BM_sendVec_binderize/512 41014 ns 17831 ns 40161
BM_sendVec_binderize/1024 37534 ns 16270 ns 41794
BM_sendVec_binderize/2048 37662 ns 16471 ns 42331
BM_sendVec_binderize/4096 38551 ns 16809 ns 35635
BM_sendVec_binderize/8192 36139 ns 15865 ns 42185
BM_sendVec_binderize/16384 51743 ns 22600 ns 31556
BM_sendVec_binderize/32768 46644 ns 20616 ns 30220
BM_sendVec_binderize/65536 68763 ns 30412 ns 25429
After:
---------------------------------------------------------------------
Benchmark Time CPU Iterations
---------------------------------------------------------------------
BM_sendVec_binderize/4 39549 ns 17214 ns 35193
BM_sendVec_binderize/8 38786 ns 16822 ns 37402
BM_sendVec_binderize/16 37787 ns 16492 ns 37100
BM_sendVec_binderize/32 40796 ns 17567 ns 36399
BM_sendVec_binderize/64 41024 ns 17797 ns 45328
BM_sendVec_binderize/128 36169 ns 15707 ns 39602
BM_sendVec_binderize/256 37136 ns 16094 ns 47081
BM_sendVec_binderize/512 37998 ns 16443 ns 48487
BM_sendVec_binderize/1024 35190 ns 15318 ns 40091
BM_sendVec_binderize/2048 37665 ns 16399 ns 39498
BM_sendVec_binderize/4096 45963 ns 19877 ns 36884
BM_sendVec_binderize/8192 40075 ns 17620 ns 34013
BM_sendVec_binderize/16384 46224 ns 20315 ns 34384
BM_sendVec_binderize/32768 49775 ns 21994 ns 35334
BM_sendVec_binderize/65536 60181 ns 27238 ns 22205
Change-Id: Ica6c55e7346b9e1ba91192472e2b229cb786802c
|
|
hidl_pointer - already zero initialized
hidl_string - now memset to 0
hidl_array - has no pad to initialize, default initialize since we
now expect structs to be default initialized to sane values.
hidl_vec - now memset to 0
hidl_memory - has three aligned(8) items which are always set
hidl_version - unused, but has two uint16_t entries
Zero-init HIDL core types (hidl_handle).
Has 7 padded bits at the end.
Since they are passed across processes.
Bug: 131356202
Test: print out values
Change-Id: I3979232879bb437d17d3a6f6013b53b2951a2138
Merged-In: I56bacf9ca7ac51d73449d11883c6224e214b8773
Merged-In: I8dd52e196e1585028d91d97f00861021c21ec09c
|
|
For critical processes (e.g. init/hwservicemanager), it's nice to check
that every error is checked. If these processes restart, it may be hard
to debug the system.
Bug: 124861676
Bug: 121004730
Test: use w/ hwservicemanager
Change-Id: I0d340c31e392bfb86a188dab902e6d20fa836814
Merged-In: I0d340c31e392bfb86a188dab902e6d20fa836814
|
|
|
|
For critical processes (e.g. init/hwservicemanager), it's nice to check
that every error is checked. If these processes restart, it may be hard
to debug the system.
Bug: 124861676
Bug: 121004730
Test: use w/ hwservicemanager
Change-Id: I0d340c31e392bfb86a188dab902e6d20fa836814
|
|
The intention for most HIDL users is to declare error codes in HIDL
interfaces and use those. Transport errors are much more rare and in
most cases can just be ignored so that init can restart the process
in question.
This also means that HIDL implementations shouldn't construct the
Status object directly.
Bug: 124861676
Bug: 121004730
Test: N/A
Change-Id: I4a5d79cf453345025c9d0b64c29a4486cc51fab4
|
|
This reverts commit f7e10f4a46ab6343b72d0a1e948d029a6a8be3ba.
That commit broke several builds.
I suspect that an implicit conversion now made explicit has exposed
several issues where a hidl_vec not was constructed correctly, but not
entirely sure.
Test: That it builds
|
|
Test: compiled
Change-Id: I07cfd3ff3dc5dbf10befe787ca4145dd9307079c
|
|
Currently, a hidl vector can be constructed using an initializer list, but
it cannot be made equal to an initializer list.
Add the missing operator here to allow for simpler usage.
Test: atest libhidl_test
Bug: 117935272
Change-Id: Id21e9cafee754968a7300a3d7bc85481d32dcc3a
|
|
This also moves the implementation to auto-generated code. Only the
values themselves are generated in auto-generated code.
Bug: 118395041
Test: hidl_test
Change-Id: I4ae3cf992a64012e431c0ade3fc4ac3645f96756
|
|
This commit changes the linkage of `kGcovPrefixEnvVar`,
`kGcovPrefixOverrideEnvVar`, `kGcovPrefixPath`, `kSysPropHalCoverage`,
and `kSysPropInstrumentationPath` to static linkage so that they won't
be exported in userdebug build. This ensures both user and userdebug
build export the same symbol set.
Bug: 117859056
Test: libhidlbase.so builds w/o problems under userdebug build
Change-Id: Id61b827f3da1964e060db6f862132da70b29cea0
|
|
Vendor process is not allowed to use system libs. Do not search
'system/lib[64]/hw' for vendor hal services.
Bug: 117166926
Test: Boot and check camera/wifi/bluetooth
Change-Id: I3894a6ecb359c5e2e17bd8171dad4731ac6071bd
|
|
When EX_TRANSACTION_FAILED is set, mError will never be okay.
From libbinder's fb26e720a27e464e388986e665a43f6dfa815144.
Bug: 116618418
Test: boot
Change-Id: I09d95649976c0e8ef6cc5f4002c93b1b7cbba9a8
|
|
Ideally these should be explicit, but warning in the header for the
time being.
Bug: N/A
Test: N/A
Change-Id: I3596c6c0f6a1157ce859e29701686b06cce6aefe
|