Commit graph

3 commits

Author SHA1 Message Date
Felix
fb55955462 health: Add CAP_WAKE_ALARM to service via init
platform/interfaces/health/2.0/default/healthd_common.cpp wants to use
timerfd_create() to register a wakealarm.

To use the timerfd_create() syscall with CLOCK_BOOTTIME_ALARM,
CAP_WAKE_ALARM is needed.

Since the .rc file for android.hardware.health@2.0 is shipped here in
system/core, update it here.

Signed-off-by: Felix <google@ix5.org>
Change-Id: I6cd5701b6e5cac37eb021d894251a3a9dc590b95
2019-01-04 02:24:41 +01:00
Yifan Hong
7eed10800e health service can write kernel log
Test: device without healthd still have battery level messages
Bug: 77541952
Fixes: 77661605
Change-Id: I9b66ecde0735accf8b2d67b9562795be80071dd9
2018-04-05 19:34:43 -07:00
Yifan Hong
2763df8eae Implement android.hardware.health@2.0.
healthd_common.cpp uses health@2.0 for health@2.0-service
and healthd.

charger and recovery will be fixed in a follow up change.
(They still use libbatterymonitor for now).

Test: adb logcat -e "health@2.0"
Test: adb shell lshal --debug

Change-Id: I9ff0691d467df37118d7f143693c1bcd17a5bcbf
2017-10-06 15:29:59 -07:00