Commit graph

17 commits

Author SHA1 Message Date
Yifan Hong
ef26fe4c16 healthd: uses android.hardware.health@2.0-service_defaults
Test: builds
Test: boots
Change-Id: Ia47ba805aa0e8f7cd6c0a7f5877b3120b0265c78
2018-07-18 13:51:01 -07:00
Yifan Hong
90fdc72409 healthd: libbatterymonitor: recovery_available
Bug: 80132328
Test: builds
Change-Id: I4d5ac73431fb002cc839fed2d97b1acff3fde263
Merged-In: I4d5ac73431fb002cc839fed2d97b1acff3fde263
(cherry picked from commit 0e317d7873)
2018-07-18 11:28:29 -07:00
Yifan Hong
31150c1121 healthd: overridden by health@2.0-service
Test: boots
Bug: 79107699
Bug: 77541952
Bug: 79107699
Change-Id: Ida4cf80d3553365b673e30cdd19590c156cb52e0
Merged-In: Ida4cf80d3553365b673e30cdd19590c156cb52e0
(cherry picked from commit 28d2fb80b2)
2018-07-17 11:57:44 -07:00
Yifan Hong
3a39eec307 healthd use vintf_fragments
This encourages device manufacturers to use
service.override over service and to remove healthd
on device, because it is one less step to do.

Test: make VINTF metadata
Bug: 66917623
Bug: 77541952
Bug: 79107699
Change-Id: I1cac3570f64a0308b1f2d465205f98a97e4b4320
Merged-In: I1cac3570f64a0308b1f2d465205f98a97e4b4320
(cherry picked from commit 2db565d75f)
2018-07-17 11:57:38 -07:00
Yifan Hong
1cf853fb65 healthd: a.h.health@2.0-service.override removes healthd
Removes healthd from the build if -service.override
is provided. This encourages developers to deprecate healthd
for their devices when they can.

When -service.override is used, framework manifest needs
to remove the /backup instance as well; this can be done
by including manifest_healthd_exclude.xml in
DEVICE_FRAMEWORK_MANIFEST_FILE.

Test: build and boot on 2016/2017 Pixel devices
Test: build and boot on a new device
Test: lshal and vts_treble_vintf_test on all these
      devices
Bug: 77541952

Change-Id: I25744feaad3034441cd7a96a5343d4ce3eedc288
2018-04-04 14:43:58 -07:00
Yifan Hong
fd1aa70a0f healthd: add healthd.rc
Split healthd section from init.rc into its own. This allows
healthd.rc to be excluded from the build when healthd is excluded.

Test: builds
Test: exclude healthd from build, healthd.rc is not installed
Bug: 77541952
Change-Id: I1c055f14c5862631f359fd0029289da8f43af063
2018-04-04 14:08:04 -07:00
Yifan Hong
affa24f28f healthd: move HealthServiceCommon
... to hardware/interfaces. HealthServiceCommon
becomes two separate libraries:
- libhealthservicedefault for services on vendor
- libhealthservicehealthd for healthd

Test: boots
Bug: 63702641
Change-Id: Ibc7096328bb36356cb653e542bab900cd046fe8a
2018-01-22 12:34:04 -08:00
Hridya Valsaraju
89178e79d5 Add libhealthstoragedefault to make files
This is to add empty implementations of methods
reporting storage health.

Bug: 68388678
Test: vts-tradefed run vts -m VtsHalHealthV2_0
Change-Id: If6180c22a4b356650084df61b1e24af3de0ca67e
2018-01-11 22:16:16 -08:00
Hridya Valsaraju
ffb13032b6 Move healthd default implementation to hardware/interfaces.
Bug: 70533363 63702641
Test: make -j32

Change-Id: Icb6eaea8641dc8ae53ed3af1fca81ddca39f8421
2017-12-12 17:20:13 -08:00
Chih-Hung Hsieh
9635266c75 Use -Werror in system/core/healthd
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I921735c9531594697e002937cd57a33c65552dbf
2017-12-01 12:32:25 -08:00
Yifan Hong
25eb37a86e healthd: clean up unused code
With migration to health 2.0 HAL, there are unused code paths
that can be removed.

Test: health VTS test
Test: charger_test
Bug: 68724651
Change-Id: I9af2f95432529a0bf6e10980a99014d570dfce93
2017-11-30 15:34:46 -08:00
Yifan Hong
31cc64aa79 healthd connect to health@1.0 hal
This is the original code path (BatteryService
-> healthd -> health 1.0 HAL). This ensures
upgrade-ability for old devices to P.

This is a partial revert of
287c41fffe, with
some modifications to the original healthd_board_*
functions for healthd.

Bug: 65990106
Test: VTS test for healthd and health service
Change-Id: If1c65e64e2fd6750369d52c8051ca6aa2b57ef27
2017-11-08 10:37:20 -08:00
Yifan Hong
cded900b96 Refactor common code between healthd and health@2.0-service
Use healthd_board_* functions for the
code that's different between them.

Bug: 65990106
Test: boots
Test: VTS tests on healthd and health service
Change-Id: I88e6f210cb91c0cf08a9d7c52910c38fa9a75130
2017-11-07 14:03:15 -08:00
Yifan Hong
12df1b9508 healthd provides IHealth/backup.
Test: lshal shows IHealth/backup
Bug: 62229583
Change-Id: Ibffdd2ec392682385ed491df22084a57280e1513
2017-10-19 14:52:00 -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
Yifan Hong
ffff9aae02 libbatterymonitor: vendor_available
libbatterymonitor is a static library.
Also removed unused libbinder dependency.

Test: pass
Change-Id: I1f17ee643e6ed1bb2c11a6f3189a448dba2927ac
2017-10-06 13:05:19 -07:00
Steven Moreland
1b13eea81f Added libhealthd-headers.
Test: use with BOARD_VNDK_VERSION=current
Change-Id: Icece8e543307498f349d7f4914ec5be6d97e98fc
2017-07-10 16:05:51 -07:00