health: add health HAL and it's default implementation.
The default Health HAL implementation continues to depend on
libhealthd.<target> BOARD_HAL_STATIC_LIBRARY in order to make
sure healthd continues to work.
New device specific Health HAL implentations don't need to
compile with healthd STATIC_HAL.
Test: Tested healthd with and without the static hal implementation
on Angler.
BUG: b/32724915
Change-Id: I25d439f24a4178666614faf196423ffc8ccafafb
Signed-off-by: Sandeep Patil <sspatil@google.com>
diff --git a/health/1.0/Android.bp b/health/1.0/Android.bp
new file mode 100644
index 0000000..fb3d8c0
--- /dev/null
+++ b/health/1.0/Android.bp
@@ -0,0 +1,51 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.health@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces android.hardware.health@1.0",
+ srcs: [
+ "types.hal",
+ "IHealth.hal",
+ ],
+ out: [
+ "android/hardware/health/1.0/types.cpp",
+ "android/hardware/health/1.0/HealthAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.health@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces android.hardware.health@1.0",
+ srcs: [
+ "types.hal",
+ "IHealth.hal",
+ ],
+ out: [
+ "android/hardware/health/1.0/types.h",
+ "android/hardware/health/1.0/IHealth.h",
+ "android/hardware/health/1.0/IHwHealth.h",
+ "android/hardware/health/1.0/BnHealth.h",
+ "android/hardware/health/1.0/BpHealth.h",
+ "android/hardware/health/1.0/BsHealth.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.health@1.0",
+ generated_sources: ["android.hardware.health@1.0_genc++"],
+ generated_headers: ["android.hardware.health@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.health@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidl",
+ "libhwbinder",
+ "libutils",
+ "libcutils",
+ ],
+ export_shared_lib_headers: [
+ "libhidl",
+ "libhwbinder",
+ "libutils",
+ ],
+}