Add IMemoryToken and the HidlMemoryToken
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
diff --git a/libhidlmemory/Android.bp b/libhidlmemory/Android.bp
index e854ab5..2135ef3 100644
--- a/libhidlmemory/Android.bp
+++ b/libhidlmemory/Android.bp
@@ -27,17 +27,20 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "android.hidl.memory@1.0"
+ "android.hidl.memory@1.0",
+ "android.hidl.memory.token@1.0",
],
local_include_dirs: ["include"],
export_include_dirs: ["include"],
export_shared_lib_headers: [
"android.hidl.memory@1.0",
+ "android.hidl.memory.token@1.0",
"libhidlbase"
],
srcs: [
+ "HidlMemoryToken.cpp",
"mapping.cpp"
],