split android.hidl.memory

Split android.hidl.memory into android.hidl.memory and
android.hidl.allocator. This must be done because IAllocator is served
over hwbinder transport and IMapper/IMemory are always going to be
passthrough hals.

Test: hidl_test, device boots with allocator
Bug: 35327976

Merged-In: Ib135b5e101fadadbbf16126a98f90181f76a253b
Change-Id: Ib135b5e101fadadbbf16126a98f90181f76a253b
diff --git a/transport/allocator/1.0/Android.bp b/transport/allocator/1.0/Android.bp
new file mode 100644
index 0000000..b610db4
--- /dev/null
+++ b/transport/allocator/1.0/Android.bp
@@ -0,0 +1,59 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hidl.allocator@1.0_hal",
+    srcs: [
+        "IAllocator.hal",
+    ],
+}
+
+genrule {
+    name: "android.hidl.allocator@1.0_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hidl:system/libhidl/transport android.hidl.allocator@1.0",
+    srcs: [
+        ":android.hidl.allocator@1.0_hal",
+    ],
+    out: [
+        "android/hidl/allocator/1.0/AllocatorAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hidl.allocator@1.0_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hidl:system/libhidl/transport android.hidl.allocator@1.0",
+    srcs: [
+        ":android.hidl.allocator@1.0_hal",
+    ],
+    out: [
+        "android/hidl/allocator/1.0/IAllocator.h",
+        "android/hidl/allocator/1.0/IHwAllocator.h",
+        "android/hidl/allocator/1.0/BnHwAllocator.h",
+        "android/hidl/allocator/1.0/BpHwAllocator.h",
+        "android/hidl/allocator/1.0/BsAllocator.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hidl.allocator@1.0",
+    generated_sources: ["android.hidl.allocator@1.0_genc++"],
+    generated_headers: ["android.hidl.allocator@1.0_genc++_headers"],
+    export_generated_headers: ["android.hidl.allocator@1.0_genc++_headers"],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "android.hidl.base@1.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hidl.base@1.0",
+    ],
+}