Updating makefiles for hidl_interface.

Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
(cherry-picked from commit c2f829a1d2673f91add6bcd536c7d4fe753d0447)
diff --git a/thermal/1.1/Android.bp b/thermal/1.1/Android.bp
index 0985d94..8c0f1f9 100644
--- a/thermal/1.1/Android.bp
+++ b/thermal/1.1/Android.bp
@@ -1,71 +1,19 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
 
-filegroup {
-    name: "android.hardware.thermal@1.1_hal",
+hidl_interface {
+    name: "android.hardware.thermal@1.1",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "IThermal.hal",
         "IThermalCallback.hal",
     ],
-}
-
-genrule {
-    name: "android.hardware.thermal@1.1_genc++",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1",
-    srcs: [
-        ":android.hardware.thermal@1.1_hal",
-    ],
-    out: [
-        "android/hardware/thermal/1.1/ThermalAll.cpp",
-        "android/hardware/thermal/1.1/ThermalCallbackAll.cpp",
-    ],
-}
-
-genrule {
-    name: "android.hardware.thermal@1.1_genc++_headers",
-    tools: ["hidl-gen"],
-    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.thermal@1.1",
-    srcs: [
-        ":android.hardware.thermal@1.1_hal",
-    ],
-    out: [
-        "android/hardware/thermal/1.1/IThermal.h",
-        "android/hardware/thermal/1.1/IHwThermal.h",
-        "android/hardware/thermal/1.1/BnHwThermal.h",
-        "android/hardware/thermal/1.1/BpHwThermal.h",
-        "android/hardware/thermal/1.1/BsThermal.h",
-        "android/hardware/thermal/1.1/IThermalCallback.h",
-        "android/hardware/thermal/1.1/IHwThermalCallback.h",
-        "android/hardware/thermal/1.1/BnHwThermalCallback.h",
-        "android/hardware/thermal/1.1/BpHwThermalCallback.h",
-        "android/hardware/thermal/1.1/BsThermalCallback.h",
-    ],
-}
-
-cc_library {
-    name: "android.hardware.thermal@1.1",
-    defaults: ["hidl-module-defaults"],
-    generated_sources: ["android.hardware.thermal@1.1_genc++"],
-    generated_headers: ["android.hardware.thermal@1.1_genc++_headers"],
-    export_generated_headers: ["android.hardware.thermal@1.1_genc++_headers"],
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "liblog",
-        "libutils",
-        "libcutils",
+    interfaces: [
         "android.hardware.thermal@1.0",
+        "android.hidl.base@1.0",
     ],
-    export_shared_lib_headers: [
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libutils",
-        "android.hardware.thermal@1.0",
-    ],
+    gen_java: true,
 }
+
diff --git a/thermal/1.1/Android.mk b/thermal/1.1/Android.mk
deleted file mode 100644
index 059ac8b..0000000
--- a/thermal/1.1/Android.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-# This file is autogenerated by hidl-gen. Do not edit manually.
-
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.thermal-V1.1-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
-    android.hardware.thermal-V1.0-java \
-    android.hidl.base-V1.0-java \
-
-LOCAL_NO_STANDARD_LIBRARIES := true
-LOCAL_JAVA_LIBRARIES += core-oj hwbinder
-
-#
-# Build IThermal.hal
-#
-GEN := $(intermediates)/android/hardware/thermal/V1_1/IThermal.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IThermal.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IThermalCallback.hal
-$(GEN): $(LOCAL_PATH)/IThermalCallback.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.thermal@1.1::IThermal
-
-$(GEN): $(LOCAL_PATH)/IThermal.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IThermalCallback.hal
-#
-GEN := $(intermediates)/android/hardware/thermal/V1_1/IThermalCallback.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IThermalCallback.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava \
-        -randroid.hardware:hardware/interfaces \
-        -randroid.hidl:system/libhidl/transport \
-        android.hardware.thermal@1.1::IThermalCallback
-
-$(GEN): $(LOCAL_PATH)/IThermalCallback.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))