thermal-hal: Update the common data object with the status
thermal-hal has a hash map storing all the sensor instances. Use the same
instance to read and update the temperature, update the severity and
determine the next threshold based on severity. Not using the same
instance can lead to a situation where the information is updated in the
local copy rather than in the global copy in the hash map.
Also change the return signature of the estimateseverity function to
return the new severity value if it is changed. Otherwise it will return
-1. This provided a mechanism for the caller's to know if there is any
change in severity for that sensor.
Change-Id: I34c2a271b505fea969db6f4a04321e63c0181ea7
4 files changed