thermal: add getUndefinedTemperature function.
Bug: 34107726
Test: cts, vts
Change-Id: I8a3794158fbc0c9518a26f4616263aa464b43924
diff --git a/thermal/1.0/default/Thermal.cpp b/thermal/1.0/default/Thermal.cpp
index 8a8ad0a..5bc313d 100644
--- a/thermal/1.0/default/Thermal.cpp
+++ b/thermal/1.0/default/Thermal.cpp
@@ -169,6 +169,13 @@
return Void();
}
+Return<void> Thermal::getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) {
+ ThermalStatus status;
+ status.code = ThermalStatusCode::SUCCESS;
+ _hidl_cb(status, UNKNOWN_TEMPERATURE);
+ return Void();
+}
+
IThermal* HIDL_FETCH_IThermal(const char* /* name */) {
thermal_module_t* module;
status_t err = hw_get_module(THERMAL_HARDWARE_MODULE_ID,
diff --git a/thermal/1.0/default/Thermal.h b/thermal/1.0/default/Thermal.h
index 2e06289..eec0ff5 100644
--- a/thermal/1.0/default/Thermal.h
+++ b/thermal/1.0/default/Thermal.h
@@ -45,6 +45,7 @@
Return<void> getTemperatures(getTemperatures_cb _hidl_cb) override;
Return<void> getCpuUsages(getCpuUsages_cb _hidl_cb) override;
Return<void> getCoolingDevices(getCoolingDevices_cb _hidl_cb) override;
+ Return<void> getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) override;
private:
thermal_module_t* mModule;
};