Add function for converting from HIDL to AIDL MQDescriptor

Given a HIDL MQDescriptor with a payload that is compatible with AIDL,
we can create an AIDL MQDescriptor to send over an AIDL interface.
The receiving side can use the AIDL MQDescriptor to create their own
instance of the Queue and use it to communicate with the other process.
The types need to be compatible between the HIDL side and AIDL side. If
they have different memory layout, the user will encounter problems when
trying to read the types.
The function statically checks the two types sizes, but not the offset
for all of the fields in the case of parcelables and HIDL data types.
The user must validate that themselves.

Test: atest fmq_unit_tests
Bug: 170748510
Change-Id: I6fe4be2a9f947ebb13e28bceff7db9c020972002
3 files changed
tree: 22cfd15bb33c5b2c7cd298db30aba08d505352a7
  1. base/
  2. benchmarks/
  3. include/
  4. tests/
  5. Android.bp
  6. EventFlag.cpp
  7. FmqInternal.cpp
  8. OWNERS
  9. PREUPLOAD.cfg
  10. TEST_MAPPING