summaryrefslogtreecommitdiff
path: root/libhidlmemory
AgeCommit message (Collapse)Author
2021-02-12[LSC] Add LOCAL_LICENSE_KINDS to system/libhidlandroid-s-preview-1Bob Badour
Added SPDX-license-identifier-Apache-2.0 to: Android.bp adapter/Android.bp libhidlmemory/Android.bp minijail/Android.bp transport/Android.bp transport/allocator/1.0/Android.bp transport/allocator/1.0/default/Android.bp transport/allocator/1.0/utils/Android.bp transport/allocator/1.0/vts/functional/Android.bp transport/base/1.0/Android.bp transport/base/1.0/vts/functional/Android.bp transport/manager/1.0/Android.bp transport/manager/1.1/Android.bp transport/manager/1.2/Android.bp transport/memory/1.0/Android.bp transport/memory/1.0/default/Android.bp transport/memory/block/1.0/Android.bp transport/memory/token/1.0/Android.bp transport/safe_union/1.0/Android.bp transport/token/1.0/Android.bp transport/token/1.0/utils/Android.bp vintfdata/Android.mk Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I2a7ef0ec44c7b087eb00ed2bdfc4940d07f7a148
2020-11-25Add product_available to product available modulesJustin Yun
vendor_available modules were available to product modules. However, not all vendor_available modules are required to be available to product modules. Some modules want to be available only to product modules but not vendor modules. To cover the requirement, we separate product_available from vendor_available. vendor_available will not provide product available module. Bug: 150902910 Test: build Change-Id: I3fea06067f4b085af5fa981ac60958fc3bd4b045
2020-07-08Make android.hardware.renderscript@1.0 buildable for native_bridgeVictor Khimenko
Bug: http://b/153609531 Test: m android.hardware.renderscript@1.0.native_bridge Change-Id: Iaf5b1942a05617934e7f42d760c6aea5551d0b89
2020-07-02libhidlmemory: Add host supportAyushi Khopkar
Host Support on libhidlmemory is needed to enable host support on libstagefright_mpeg2support Test: Build libhidlmemory on host Bug: 151789773 Change-Id: I1bb63a78fa0ed7b9761f056c26f24d3b32d7f7a6
2020-04-22Set min_sdk_version to be part of mainline modulesJooyung Han
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: I87ce41ad18a7a39f2c6c41c5aec2d8338db3ec8d
2020-03-07Set apex_available propertyJiyong Park
The marked library(ies) were available to the APEXes via the hand-written whitelist in build/soong/apex/apex.go. Trying to remove the whitelist by adding apex_available property to the Android.bp of the libraries. Bug: 150999716 Test: m Change-Id: I363c56ec44c6b41e05d35b3d30e7526db79ff7c7
2020-02-13Make libhidl(base|memory) apex-available for com.android.neuralnetworks.Przemyslaw Szczepaniak
Test: coral-userdebug build Bug: 148593574 Change-Id: Ic22638f2df606e11f139d441d2a72e77eb82ba24
2019-09-05Remove libhwbinder/libhidltransport depsSteven Moreland
Since these were combined into libhidlbase. Bug: 135686713 Test: build only (libhwbinder/libhidltransport are empty) Change-Id: I5c69afb373ce3a3f106d7bdcc1a8cf02fccf9d78
2018-05-15mapMemory: Do not map if size is > SIZE_MAXYifan Hong
am: 694bd8d1b4 Change-Id: I7f8e06ef62c225b5a442e2a2c1810a27185e16bd
2018-05-14mapMemory: Do not map if size is > SIZE_MAXYifan Hong
Bug: 79376389 Test: hidl_test Test: POC in bug Change-Id: Ibaced858aa07bfd7ab6e938cc1339b974b0de14f Merged-In: Ibaced858aa07bfd7ab6e938cc1339b974b0de14f
2017-11-29Add IMemoryToken and the HidlMemoryTokenHoward Chen
The IMemoryToken is an interface which composes shared memory. It provides a get() method, which returns an instance of hidl_memory that always refer to the same memory. The HidlMemoryToken is an implementation of the IMemoryToken. Bug: 69640337 Test: hidl_test Change-Id: Idf3a090213be8cb315134143cb81e1d7df91b4a2
2017-11-29Revert "Add IMemoryToken and the HidlMemoryToken"Joachim Sauer
This reverts commit 2c16d029914a7908e225e9b7dca555b32638ea57. Bug: 69640337 Test: m tests Change-Id: Ibe3b751f98646ccf84e65bfebd3e639f9ec3c7e2
2017-11-29Add IMemoryToken and the HidlMemoryTokenHoward Chen
The IMemoryToken is an interface which composes shared memory. It provides a get() method, which returns an instance of hidl_memory that always refer to the same memory. The HidlMemoryToken is an implementation of the IMemoryToken. Bug: 69640337 Test: hidl_test Change-Id: Ida32a7971ba31e99f724c18159cf2e1f699b73b8
2017-10-24Add header guard to mapping.hHoward Chen
Test: compile goog/master Change-Id: I88ace1624463e79be416cb0c7e9c7f7d6fd20f0c
2017-10-02libhidlmemory: clarify mapMemory function.Steven Moreland
This function has been abused in the past. The result from mapMemory should be cached and used rather than the hidl_memory object itself. Bug: 34234561 Test: none Change-Id: I0e1705553243979d6174c3c971b3373d99350191
2017-08-09Replace soong variables with cc_defaults.Steven Moreland
am: c75fc62c3a Change-Id: Icc830a0cb4e86327c5fc9f6f31a274368967c2bf
2017-08-09Update makefiles for vndk-sp.Justin Yun
am: 768011e1c1 Change-Id: I8fcb45f7cefdba8e35b1bf7d1ee444facfeaec3d
2017-08-09Mark hidl libs as VNDK or VNDK-SP in Android.bpJustin Yun
am: 74f6593212 Change-Id: Id6a48dc7d40f1576cc99d492388f2d2e751203c1
2017-08-08Replace soong variables with cc_defaults.Steven Moreland
Bug: 64318482 Test: links Change-Id: Id03af485a4282db5b9a13a79fce00a2d66b59ffc
2017-08-07Update makefiles for vndk-sp.Justin Yun
libhidlmemory and android.hidl.memory@1.0 are vndk-sp. They must have "support_system_process: true" in "vndk" property. Bug: 63866913 Test: build and boot with BOARD_VNDK_VERSION=current Merged-In: I0c1ec63d5c5d32e11b578f2f09a897e0129271e7 Change-Id: I0c1ec63d5c5d32e11b578f2f09a897e0129271e7 (cherry picked from commit 0727497c62ee470bc43155f3f1dcc46fd4382510)
2017-08-07Mark hidl libs as VNDK or VNDK-SP in Android.bpJustin Yun
As a VNDK/VNDK-SP module, Android.bp must have 'vndk' tag as well as 'vendor_available: true'. For a VNDK module, the 'vndk' tag has 'enabled: true'. It will be installed system/lib(64)/vndk as a vendor variant. For a VNDK-SP module, the 'vndk' tag has 'support_system_process: true' as well as 'enabled: true'. It will be installed system/lib(64)/vndk-sp as a vendor variant. Note: libhidlmemory will be changed to vndk-sp. Bug: 63866913 Test: build and boot with BOARD_VNDK_VERSION=current Merged-In: I9e3c9603f1d218c17ccb8e6aea7afad6f9d28b92 Change-Id: I9e3c9603f1d218c17ccb8e6aea7afad6f9d28b92 (cherry picked from commit 4e077f2d177d11f8b8d53ce8a4282cfb71894537)
2017-08-04Merge "Use cc_library for libhidlmemory" into oc-mr1-devTri Vo
2017-08-04Use cc_library for libhidlmemoryTri Vo
Both static and shared versions are now available. Bug: 64040096 Test: compiles Merged-In: I046256e5f1031919092d1e0b6b56e27c7cedb0b4 Change-Id: I046256e5f1031919092d1e0b6b56e27c7cedb0b4 (cherry picked from commit 681cd6abeae0b3d9d2db954aafbd194b4ec477a9)
2017-08-04Use cc_library for libhidlmemoryTri Vo
am: 681cd6abea Change-Id: I51f9212a3d1fce5eff62a9ea65599808a3baaf9b
2017-08-03Use cc_library for libhidlmemoryTri Vo
Both static and shared versions are now available. Bug: 64040096 Test: compiles Change-Id: I046256e5f1031919092d1e0b6b56e27c7cedb0b4
2017-08-03libhidlmemory and android.hidl.memory@1.0 are vndk-sp.Justin Yun
libhidlmemory and android.hidl.memory@1.0 are vndk-sp. They must have "support_system_process: true" in "vndk" property. Bug: 63866913 Test: build and boot with BOARD_VNDK_VERSION=current Change-Id: I0c1ec63d5c5d32e11b578f2f09a897e0129271e7
2017-08-03Mark hidl libs as VNDK or VNDK-SP in Android.bpJustin Yun
As a VNDK/VNDK-SP module, Android.bp must have 'vndk' tag as well as 'vendor_available: true'. For a VNDK module, the 'vndk' tag has 'enabled: true'. It will be installed system/lib(64)/vndk as a vendor variant. For a VNDK-SP module, the 'vndk' tag has 'support_system_process: true' as well as 'enabled: true'. It will be installed system/lib(64)/vndk-sp as a vendor variant. Note: libhidlmemory will be changed to vndk-sp. Bug: 63866913 Test: build and boot with BOARD_VNDK_VERSION=current Change-Id: I9e3c9603f1d218c17ccb8e6aea7afad6f9d28b92
2017-05-31Cache IMapper instances.Martijn Coenen
am: e5f1e5a262 Change-Id: Ice65d227069c4b336ee9efbc6373f01fddb2b5cc
2017-05-31Cache IMapper instances.Martijn Coenen
To avoid calling dlopen() every time mapMemory() is called. Test: boots Bug: 36727951 Bug: 38031165 Change-Id: I17ac8289f9d1a3f056697a1379b8f305f18302bd
2017-05-17Allow clients of mapMemory to recover.Steven Moreland
Before, memory could only be nullptr if a mapper instance returned nullptr. However, sometimes this method would abort. This is problematic, for instance, when unknown code sends an instance of hidl_memory to another process. You are forced to manually write the contents of this mapMemory method with the proper error handling or to risk your process being aborted. Since this method already returns nullptr sometimes, and the default usecase is to pass things into this method which are from another process, allowing users of this method to handle errors manually will close a whole class of errors. Test: (sanity) hidl_test, internal device boots Fixes: 38377981 Change-Id: Ida6e73b224da34175746e86a08f545ef6db92293
2017-04-19Mark libhidlmemory as vendor_availableSteven Moreland
By setting vendor_available, the following may become true: * a prebuilt library from this release may be used at runtime by in a later releasse (by vendor code compiled against this release). so this library shouldn't depend on runtime state that may change in the future. * this library may be loaded twice into a single process (potentially an old version and a newer version). The symbols will be isolated using linker namespaces, but this may break assumptions about 1 library in 1 process (your singletons will run twice). Background: This means that these modules may be built and installed twice -- once for the system partition and once for the vendor partition. The system version will build just like today, and will be used by the framework components on /system. The vendor version will build against a reduced set of exports and libraries -- similar to, but separate from, the NDK. This means that all your dependencies must also mark vendor_available. At runtime, /system binaries will load libraries from /system/lib*, while /vendor binaries will load libraries from /vendor/lib*. There are some exceptions in both directions -- bionic(libc,etc) and liblog are always loaded from /system. And SP-HALs (OpenGL, etc) may load /vendor code into /system processes, but the dependencies of those libraries will load from /vendor until it reaches a library that's always on /system. In the SP-HAL case, if both framework and vendor libraries depend on a library of the same name, both versions will be loaded, but they will be isolated from each other. It's possible to compile differently -- reducing your source files, exporting different include directories, etc. For details see: https://android-review.googlesource.com/368372 None of this is enabled unless the device opts into the system/vendor split with BOARD_VNDK_VERSION := current. Bug: 36426473 Bug: 36079834 Test: m -j libhwbinder Test: attempt to compile with BOARD_VNDK_VERSION := current (cherry picked from commit 95df2d370f0ed7e54fa4c3636a7fbb18e73789cc) Merged-In: Id2dfdb40fdbce160cb2262bbdac072ed08de651e Change-Id: Id2dfdb40fdbce160cb2262bbdac072ed08de651e
2017-04-12Mark libhidlmemory as vendor_availableSteven Moreland
By setting vendor_available, the following may become true: * a prebuilt library from this release may be used at runtime by in a later releasse (by vendor code compiled against this release). so this library shouldn't depend on runtime state that may change in the future. * this library may be loaded twice into a single process (potentially an old version and a newer version). The symbols will be isolated using linker namespaces, but this may break assumptions about 1 library in 1 process (your singletons will run twice). Background: This means that these modules may be built and installed twice -- once for the system partition and once for the vendor partition. The system version will build just like today, and will be used by the framework components on /system. The vendor version will build against a reduced set of exports and libraries -- similar to, but separate from, the NDK. This means that all your dependencies must also mark vendor_available. At runtime, /system binaries will load libraries from /system/lib*, while /vendor binaries will load libraries from /vendor/lib*. There are some exceptions in both directions -- bionic(libc,etc) and liblog are always loaded from /system. And SP-HALs (OpenGL, etc) may load /vendor code into /system processes, but the dependencies of those libraries will load from /vendor until it reaches a library that's always on /system. In the SP-HAL case, if both framework and vendor libraries depend on a library of the same name, both versions will be loaded, but they will be isolated from each other. It's possible to compile differently -- reducing your source files, exporting different include directories, etc. For details see: https://android-review.googlesource.com/368372 None of this is enabled unless the device opts into the system/vendor split with BOARD_VNDK_VERSION := current. Bug: 36426473 Bug: 36079834 Test: m -j libhwbinder Test: attempt to compile with BOARD_VNDK_VERSION := current Change-Id: Id2dfdb40fdbce160cb2262bbdac072ed08de651e
2017-02-17Build with -Wall and -Werror.Steven Moreland
Test: pass Change-Id: I0b14bfca491b67883bdff079b2e863db4691b635
2017-01-05Callback elision for HIDL interfaces.Martijn Coenen
Test: mma, hidl_test Bug: 31380743 Change-Id: If5f0dc0279e717dafaf416776be89cc854c6f856
2016-12-02Hidlized version of IMemory.Martijn Coenen
- Add hidl_memory type. - Add android.hidl.memory@1.0 package - IMapper - IAllocator - IMemory - Add libhidlmemory - Add default implementation of android.hidl.memory@1.0 - Ashmem - Ion (TODO, probably in another CL) Test: compiles (WIP) Change-Id: I4632eeb6a0051551b54ce04d919aaf551dfc5f28