universal7904: Switch to pixel thermal HAL
Change-Id: Ib728ab725f63145df4c72131c28c04d273d8edf4
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
diff --git a/configs/thermal/thermal_info_config.json b/configs/thermal/thermal_info_config.json
new file mode 100644
index 0000000..143689d
--- /dev/null
+++ b/configs/thermal/thermal_info_config.json
@@ -0,0 +1,103 @@
+{
+ "Sensors": [
+ {
+ "Name": "BIG",
+ "Type": "CPU",
+ "HotThreshold": [
+ "NAN",
+ "NAN",
+ "NAN",
+ 91.0,
+ "NAN",
+ "NAN",
+ 115.0
+ ],
+ "VrThreshold": "NAN",
+ "Multiplier": 0.001
+ },
+ {
+ "Name": "LITTLE",
+ "Type": "CPU",
+ "HotThreshold": [
+ "NAN",
+ "NAN",
+ "NAN",
+ 91.0,
+ "NAN",
+ "NAN",
+ 115.0
+ ],
+ "VrThreshold": "NAN",
+ "Multiplier": 0.001
+ },
+ {
+ "Name": "G3D",
+ "Type": "GPU",
+ "HotThreshold": [
+ "NAN",
+ "NAN",
+ "NAN",
+ 91.0,
+ "NAN",
+ "NAN",
+ 115.0
+ ],
+ "VrThreshold": "NAN",
+ "Multiplier": 0.001
+ },
+ {
+ "Name": "ac",
+ "Type": "USB_PORT",
+ "HotThreshold": [
+ "NAN",
+ "NAN",
+ "NAN",
+ "NAN",
+ "NAN",
+ "60.0",
+ "NAN"
+ ],
+ "HotHysteresis": [
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 5.0,
+ 0.0
+ ],
+ "VrThreshold": "NAN",
+ "Multiplier": 0.001,
+ "Monitor": true
+ },
+ {
+ "Name": "battery",
+ "Type": "BATTERY",
+ "HotThreshold": [
+ "NAN",
+ "NAN",
+ "NAN",
+ "NAN",
+ "NAN",
+ "NAN",
+ 60.0
+ ],
+ "VrThreshold": "NAN",
+ "Multiplier": 0.001
+ }
+ ],
+ "CoolingDevices": [
+ {
+ "Name": "thermal-cpufreq-0",
+ "Type": "CPU"
+ },
+ {
+ "Name": "thermal-cpufreq-1",
+ "Type": "CPU"
+ },
+ {
+ "Name": "thermal-gpufreq-0",
+ "Type": "GPU"
+ }
+ ]
+}
diff --git a/manifest.xml b/manifest.xml
index 8108dae..2b74501 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -227,16 +227,6 @@
<fqname>@2.0::ISoundTriggerHw/default</fqname>
</hal>
<hal format="hidl">
- <name>android.hardware.thermal</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IThermal</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IThermal/default</fqname>
- </hal>
- <hal format="hidl">
<name>android.hardware.usb</name>
<transport>hwbinder</transport>
<version>1.1</version>
diff --git a/proprietary-files.txt b/proprietary-files.txt
index bcdff9e..d7a7bcb 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -182,10 +182,6 @@
vendor/lib/libyasalgo.so
vendor/lib64/libyasalgo.so
-# Thermal
-vendor/lib/hw/thermal.universal7904.so
-vendor/lib64/hw/thermal.universal7904.so
-
# Wifi
vendor/bin/hw/macloader
vendor/bin/wlbtd
diff --git a/universal7904-common.mk b/universal7904-common.mk
index 970d512..903a43a 100644
--- a/universal7904-common.mk
+++ b/universal7904-common.mk
@@ -213,8 +213,10 @@
# Thermal
PRODUCT_PACKAGES += \
- android.hardware.thermal@1.0-impl \
- android.hardware.thermal@1.0-service
+ android.hardware.thermal@2.0-service.samsung
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/thermal/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
# Touch
PRODUCT_PACKAGES += \