thermal: IThermal V1.1, add methods to send thermal throttling events
Add IThermalCallback and IThermal::registerThermalCallback() method.
Frameworks code calls this method to register a callback used by the
IThermal HAL implementation to send thermal events to the framework
ThermalService.
Bug: 30982366
Test: VtsHalThermalV1_1Target on marlin
manual test on marlin using marlin 1.1 HAL with modified
thermal-engine.conf and temporary debug code for notification
Change-Id: Ib49ad93a9495e3af515fced4e46f20186661fe07
(cherry picked from commit cf964d79c1d41bba999e58cb476af099191a6634)
diff --git a/thermal/1.1/Android.bp b/thermal/1.1/Android.bp
new file mode 100644
index 0000000..833f219
--- /dev/null
+++ b/thermal/1.1/Android.bp
@@ -0,0 +1,68 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+ name: "android.hardware.thermal@1.1_hal",
+ 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_shared {
+ 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,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hardware.thermal@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hardware.thermal@1.0",
+ ],
+}