Add NDK support for thermal headroom callback API
Fix the bug that thermal status server listener is not reset to null
if the server registration call fails temporarily, which can prevent
the apps from registering thermal callback indefinitely until restart
Fix the bug that app listener is removed even if server
listener fails to unregister, which can confuse the app as it
will return the error status and subsequent unregistration will always
fail with EINVAL due to listener not found
Bug: 360486877
Flag: EXEMPT NDK
Test: atest NativeThermalTest NativeThermalUnitTest
Change-Id: I2d08ad15e80cc5ea9a75f52ac53d4662db42a11c
3 files changed