Commit Graph

15 Commits

Author SHA1 Message Date
Subbaraman Narayanamurthy def58e2e5a healthd: store battery info based on property
Currently battery parameters are stored in libhealthd.msm by
default. Allow it storing based on a persist property.

Change-Id: I90986c3e79e7af307d1c77d765436f70af1df192
2017-10-18 20:05:29 -07:00
Subbaraman Narayanamurthy 4b3284ae73 healthd: add support for dynamic logging
Core healthd shows a log with battery parameters and charging
status periodically. Currently this is kept disabled by default
to reduce log spew. Add support to control this logging based
on a property (persist.healthd_msm.log_en) which upon set will
enable logging. This will be useful for testing.

Change-Id: Ic23f4ba310994dc0a265de3dd09898dd75075e00
2017-10-18 20:05:24 -07:00
Subbaraman Narayanamurthy 7c3d7ba0f1 healthd: change backlight path
Change backlight path so that backlight can be accessed and
controlled when requested.

Change-Id: Ie0cb987709413a321d3d6c20ae0218088c411950
2017-10-18 20:05:20 -07:00
Fenglin Wu 2fec439331 healthd: Add null termination for reading buffers
The buffers contain the data reading from files may lack of null
termination and cause buffer overreading. Add null termination for
them.

CRs-Fixed: 1111042
Change-Id: I9db21d0734a5226235429d9cb76baea219e7b6c5
2017-08-07 16:35:31 -07:00
Mao Jinlong 7ec03e79f2 healthd : Changes of power off charging alarm
1. Start alarm thread when device enters power off charging mode.
Reboot the device when alarm time is up during power off charging.

2. Add reboot function to event data.If the alarm event happens, call
reboot function immediately to ensure that device won't go to suspend
during calling reboot function.

3. Add alarm seconds check in case of that power off alarm time is up
when start alarm thread. If the final alarm time is less than the
estimated time of next boot completed to fire, that means it is not able
to fire the last power off alarm at the right time, so just miss it.

CRs-Fixed: 2054302
Change-Id: I40bd9c35a9e42aeabb742603e161c2049cd0b5f5
2017-06-29 01:23:42 -07:00
Divya Sharma 06aba560f6 healthd: Add include path for minui.h
The minui.h header file path has changed such that it
now resides within recovery/minui/include. Update the
healthd makefile to reflect this

Change-Id: I4ed371156b075f5b96404480b3703f113003979b
2017-01-25 12:22:07 -08:00
David Ng bb129e2bde Initial bring-up changes
Numerous changes for initial bring-up:
- Add pure AOSP handling to libhealthd.msm
- Update to new ReadArgs() API in librecovery_updater_msm
- Temporarily disable common device overlay
- Switch qcom_diag AID to diag

Change-Id: I76892dfa6da6cf3e9ce6e96733f1f1057b5c1f83
2016-12-09 20:17:17 -08:00
Ashay Jaiswal 1d909c83ec healthd: fix LED blink path search logic
Current implementation of "get_blink_led_for_hvdcp" returns error
in case if write operation fails for any LED. Fix the logic to try
for all LEDs before returning error.

CRs-Fixed: 1068216
Change-Id: Iec836bd999997fd713a5eebde5a117f49b79de37
2016-09-26 18:32:44 +05:30
Subbaraman Narayanamurthy da84226af2 healthd: add support for storing battery parameters
There is a requirement to store battery parameters when the
system is running so that they may be restored when the system
boots up especially when the battery is removed and re-inserted.
Add support for it.

While at it, cleanup the code to reduce some redundancy. Also,
add a separate tag (healthd_msm) for printing logs from
libhealthd.msm during android mode.

CRs-Fixed: 1018233
Change-Id: I15439282c133ac92568bc7ff7750ab1b268cbb02
2016-07-14 19:15:25 -07:00
Fenglin Wu 7d8f6054a8 healthd: Check SoC status before entering off-mode charging
The battery capacity reporting from battery power_supply could be a
default value before BMS initialization done. This causes an incorrect
battery capacity being showed up at the beginning frames of off-mode
charging. Check whether the soc reporting is ready before entering into
off-mode charging.

CRs-Fixed: 1042133
Change-Id: I35d9308dc56d7d4acfbad74ddccd53a64afb53ce
2016-07-14 19:15:06 -07:00
Ashay Jaiswal 383b5447fd healthd: update header file path
healthd daemon uses minui header files add path of minui
header files in local include.

Change-Id: I124cede0b5d81c9e48fb463468435d010af27bd3
2016-05-25 10:37:35 +05:30
Anshul Verma 0a32f71b7b Initial release bring-up
Changes to bring-up tree on new release. Some permanent
and some temporary until all modules are in place.

Change-Id: I72ac646012d03f9442313d08a7879a55e789d1d3
2016-04-03 00:44:43 +05:30
Mao Jinlong 8c340ac1fb healthd: Support alarm in power off charging mode
If there is rtc alarm during power off charging mode, reboot device
when alarm time is up.

Change-Id: Ifd763478606796731ddb11da3a3673d70f66b49b
2015-12-13 21:57:49 -08:00
Chunmei Cai a0bd6273a7 healthd: correct the led blinking indication condition
Charging Led blinking only allowed when battery SoC between
15% to 90% and HVDCP charger inserted.

Change-Id: I5b601b3487164c46e80bc309b2938dd025754734
2015-11-09 13:46:58 +08:00
Fenglin Wu ac0a1d20fe healthd: Add libhealthd.msm library
Few APIs are provided in the libhealthd library as the supplement of
off-mode charging, it includes:
 1) Draw battery status on the animation;
 2) Update leds upon battery status change;
 3) Handle charging disabled;

Change-Id: Ifa42ccec70e4f3e7b20fda5ce3f33dc41252a440
2015-10-22 22:17:39 -07:00