Commit graph

22 commits

Author SHA1 Message Date
Steven Moreland
2ca1e9ad88 libaidlcommonsupport_test: static libs
In case devices don't have them.

I've also changed the version of these libraries which are used to be
explicit.

Fixes: 178483563
Test: libaidlcommonsupport_test
Change-Id: I4ebbbc84f8cb383b99d1e9a1ecc5ad6b28b8549e
2021-01-26 19:37:22 +00:00
Devin Moore
17365e56a2 Use NativeHandle in MQDescriptor instead of ParcelFileDescriptor
android.hardware.common.fmq.MQDescriptor needs to handle multiple file
descriptors, so changing from ParcelFileDescriptor to
android.hardware.common.NativeHandle.
android.hardware.common.fmq.GrantorDescriptor needs to keep track of the
fdIndex as well.

Bug: 176912570
Test: atest fmq_unit_tests fmq_test

Change-Id: I15f2393e6c420ae5394322b28c4523fa80f7dcc7
2021-01-22 13:30:19 -08:00
Steven Moreland
74e043ba2d support lib for libcutils<->NDK AIDL handle
The native_handle API is notoriously tricky to work with, and this is
expected to be very common. So, adding a small helper library.

Fixes: 175432703
Test: atest libaidlcommonsupport_test
Change-Id: I4a00d2b14fefe6c979ee656e353e117661a1a483
2020-12-15 16:45:20 +00:00
Treehugger Robot
ada6d347a2 Merge "android.hardware.common: support Java" 2020-10-24 00:20:10 +00:00
Steven Moreland
d9a93ca476 android.hardware.common: support Java
The handle type here is needed in some HALs now (specifically in order
to encode a Surface, which is backed by a handle). This previously
wasn't in Java simply because handles are more common in native code,
and so it wasn't expected to be used.

Fixes: 171087128
Test: build
Change-Id: Ie1eaf50cc8e62932cc553b80c02be434bfbaf3b3
2020-10-21 22:59:12 +00:00
Treehugger Robot
61c62c6b56 Merge "Update VNDK version for common graphics HALs." 2020-10-20 23:56:51 +00:00
Steven Moreland
67f5d0f838 Update VNDK version for common graphics HALs.
We are adding things to them, and in order for core libraries like libui
to use them, the newer versions need to be in the VNDK.

Bug: 170435409
Test: build
Change-Id: I4094240656f357b5ae52194befd0e10627b9fe23
Merged-In: I4094240656f357b5ae52194befd0e10627b9fe23
2020-10-19 21:04:14 +00:00
Devin Moore
14b2cbe96d Move AIDL FMQ types from android.hardware.common
Moved the types to andrdoid.hardware.common.fmq.
This allows modules to depend on the unstable version of the library
without conflicting with modules that depend on the stable version of
android.hardware.common.

Test: atest fmq_unit_tests fmq_test
Bug: 142326204
Change-Id: I3091f52c4e763a15fd9a1b7451a1455a06fb4c30
2020-10-09 13:00:16 -07:00
Devin Moore
dd61a8901d Reland "Add template parameters to MQDescriptor"
b26628ac32

Bug: 142326204

Change-Id: I78d08f84231ca19905f51b0520ede1b71df34365
2020-09-22 17:33:14 +00:00
Diego Wilson
b26628ac32 Revert "Add template parameters to MQDescriptor"
Revert "Change payload type to int32_t for fmq device tests"

Revert submission 1431616-thirtytwo

Reason for revert: This topic broke the aosp_x86-userdebug target. Details at http://b/169077648

Reverted Changes:
If736389eb:Add template parameters to MQDescriptor
Ice9c28c3d:Change HIDL fmq tests to use int32_t for payload
Ia18d8459b:Add template arguments to MQDescriptor for AIDL
I95586cc83:Change payload type to int32_t for fmq device test...

Change-Id: Ib7c409b164c76517d642a415cdfc2406e4f2f351
2020-09-21 19:36:49 +00:00
Devin Moore
340f895d30 Add template parameters to MQDescriptor
First parameter is used to determine the type of the payload, and the
second parameter is used to determine the type of queue.
Added two types to be use in that second parameter.
SynchronizedReadWrite and UnsynchronizedWrite.

Test: atest fmq_unit_tests fmq_test
Bug: 142326204

Change-Id: If736389ebecd02b87879850714606523e5145579
2020-09-18 10:55:15 -07:00
Xin Li
36dcf1a404 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I6502829205ede2de914b27e6c2c5c42916af2b39
Change-Id: I7cb06511e43bd1fffd5f80a11dbdf5b1314cfe8e
2020-08-28 13:05:04 -07:00
Devin Moore
f3eaf31e3b Clean up android.hardware.common types
Removed unnecessary 'flags' and 'fdIndex' fields from GrantorDescriptor.
Added additional comments for clarity.

Test: builds
Bug: 142326204
Change-Id: Id818ceb593ba2837d56dbfb3351d2127ec50b7ed
2020-08-17 17:43:32 -07:00
Devin Moore
1b34d67b7a Adding AidlMQDescriptor and GrantorDescriptor
Adding these two types to android.hardware.common for future use with
Fast Message Queue in libfmq.

Also adding to the mq_test_service to test them.

Test: system/tools/hidl/tests/run_all_device_tests.sh

Bug: 142326204

Change-Id: I424c4849c822436f58e40f206b09ffdf9baf260b
2020-08-14 09:21:22 -07:00
Devin Moore
815e9dc82d *common: create current API dump
Generated files with:
m android.hardware.common-update-api
m android.hardware.graphics.common-update-api

Test: Builds
We don't want this commit merged into branches that have added
these types already, as they may have changed.
Merged-In: Ie1d92a50dddf7e3e1bd473e2a957279c6dadb865
Change-Id: I2d83dfdb1d0ba75c76774ded26c4ce93b1807097
2020-07-17 16:48:59 +00:00
Steven Moreland
014e70b1ea *common: use package as name
In order to provide a more descriptive name, and to be consistent
with HIDL, the stable AIDL package names are switching from
vintf-*common format to the package format
(android.hardware.*common).

Bug: N/A
Test: all build time
Merged-In: Ie1d92a50dddf7e3e1bd473e2a957279c6dadb865
(cherry picked from commit 926aa80f04)
Change-Id: I82b2255986a7089e625e02a1b48906611178895d
2020-07-15 16:30:43 -07:00
Pawin Vongmasa
ae120eef52 Add AIDL type for HardwareBuffer
This includes other types needed by HardwareBuffer.

Test: Builds

Bug: 145839204
Change-Id: I86c9d2f0cb04b597da9a93b7b6210b041312e1ac
Merged-In: I86c9d2f0cb04b597da9a93b7b6210b041312e1ac
(cherry picked from commit d535133127)
2020-07-15 14:36:31 -07:00
Jooyung Han
350467dac3 Set min_sdk_version to be part of mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Change-Id: Ie6912167932812afb6e5f1ef5325ce7997cd04ae
2020-05-21 22:58:23 +09:00
Jeongik Cha
7e2674589f Freeze vintf aidl interfaces
AIDL interfaces which are vintf-stable have to be frozen in release.
But these interfaces have been never frozen, so freeze them.

- android.hardware.common
- android.hardware.automotive.occupant_awareness
- android.hardware.rebootescrow
- android.hardware.graphics.common

Bug: 153510296
Bug: 153510400
Bug: 153510960
Bug: 153511702
Test: m
Change-Id: I56e53209eaf00518ec83f2a322e89d6d944eb0ac
2020-04-08 13:36:51 +00:00
Jiyong Park
f20a45e7c3 Update the current API dump
All aidl_interface modules should by default considered as stable, in
case it is used across system and vendor partitions, or across modules.
Like other API surfaces, we need to have a dump for the current
(yet-to-be-released) version and update it when there is an API change.
This is done via .

Then the owner of the interface can freeze the current version as a
numbered version via .

This change shal be rejected only when the owner is certain that the
interface is not used across the updatable boundaries.

Bug: 152655547
Test: m
Change-Id: Icc9c32aaf7f8555e6a3792bb5e5a2b48a446c545
2020-03-30 15:01:03 +09:00
Steven Moreland
926aa80f04 *common: use package as name
In order to provide a more descriptive name, and to be consistent
with HIDL, the stable AIDL package names are switching from
vintf-*common format to the package format
(android.hardware.*common).

Bug: N/A
Test: all build time
Change-Id: Ie1d92a50dddf7e3e1bd473e2a957279c6dadb865
2020-01-06 23:25:20 +00:00
Pawin Vongmasa
d535133127 Add AIDL type for HardwareBuffer
This includes other types needed by HardwareBuffer.

Test: Builds

Bug: 145839204
Change-Id: I86c9d2f0cb04b597da9a93b7b6210b041312e1ac
2019-12-13 17:28:57 -08:00