3
0
Fork 0
Go to file
David Ferguson 92673a8d71 [libhealthd] Proper battery paths
* 4.4 introduces a new daemon, healthd, that handles battery status
    - resides in: /system/core/healthd
    - BatteryMonitor.cpp iterates through all the *directories* under
      /sys/class/power_supply looking for a file called 'type'
    - if the type == Battery, it assumes this is the location for the
      battery stats for the device. Only the first directory that matches
      this criteria is used.
    - on msm8660/d2/jf/s2 kernels, this search results in:
      /sys/class/power_supply/fuelgauge.
    - To determine capacity, healthd looks at the contents of the
      'capacity' file under this discovered base path. This results
      in /sys/class/power_supply/fuelgauge/capacity on msm8660/d2/jf/s2
      kernels.
    - Unfortunately, this is the wrong path. The capacity file at this
      location returns a large negative number.
    - Other paths like status, voltage_now, and present are also
      incorrectly determined.
  * For comparison, in 4.3 battery statistics gathering was handled by
    frameworks/base/services/jni/com_android_server_BatteryService.cpp
    - BatteryService does a similar search for a file called 'type' with
      the contents of 'Battery'
    - But the search logic is different here: it takes the *last* path that
      matches the criteria.
    - This results in the correct /sys/class/power_supply/battery
  * This patch overrides the discovery mechanism for battery status completely.

Change-Id: I4579c92bba5596eef4dac67b8c0687be50a1d2f5
2013-11-17 19:17:26 +04:00
bluetooth bluetooth: Update config 2012-12-12 00:47:27 -05:00
camera galaxys2: camera: add video snap param and set to "false" 2013-09-19 17:57:19 +02:00
configs galaxys2: add netflix hack 2013-09-02 21:37:30 +02:00
gpswrapper initial commit 2012-07-25 04:32:16 +02:00
include galaxys2: update gps header 2013-07-28 00:47:10 +02:00
libhealthd [libhealthd] Proper battery paths 2013-11-17 19:17:26 +04:00
overlay galaxys2-common: Update torch overlays 2013-10-23 23:16:50 -07:00
recovery Fix recovery compatible issues 2013-11-13 11:00:24 +04:00
releasetools ota: Fix invocation of AppendAssertions 2013-10-18 22:53:54 +01:00
res/charger initial commit 2012-07-25 04:32:16 +02:00
rootdir wifi: update {wpa,p2p}_supplicant services init 2013-11-13 18:22:16 +04:00
selinux Remove duplicate selinux policy entry 2013-11-13 16:03:54 +04:00
tinyalsa_audio galaxys2-common: audio: fix merge fail 2013-05-26 02:23:31 +02:00
yamaha-mc1n2-audio mc1n2: Opensource audio HAL from Replicant 2012-12-02 15:33:50 +01:00
Android.mk galaxys2: move device settings from i9100 2013-06-09 10:31:32 +02:00
BoardCommonConfig.mk [libhealthd] Proper battery paths 2013-11-17 19:17:26 +04:00
common.mk Merge "Fix graphical issues" into cm-11.0 2013-11-17 11:50:32 +00:00
extract-files.sh galaxys2-common: Use open source libsecion. 2013-02-24 14:47:56 +08:00
proprietary-files.txt galaxys2-common: Use open source libsecion. 2013-02-24 14:47:56 +08:00
shbootimg.mk initial commit 2012-07-25 04:32:16 +02:00