forked from crdroidandroid/android_system_core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
healthd: don't report fake data for battery-less devices
If the kernel does not implement a power_supply class device of type battery, do not report fake data, instead report the following by default: * batteryPresent = false (instead of true), * charging status = unknown (instead of charging), * capacity = 0 (instead of 100%), * health = unknown (instead of good), * AC charger online not modified (instead of forcing true) If no charger and no battery devices are supplied by the kernel, the AC charger online property will no longer be forced to true. Devices that are always plugged into AC power should either implement a power_supply class charger device or implement a Health HAL that sets properties appropriately. Bug: 34507420 Test: manual: gce_x6_phone (no battery or charger), boots and stays booted, inspect properties Change-Id: I14cb3b685e8130428e417e7d08c4246f7415210a
- Loading branch information
1 parent
d21c204
commit de610c9
Showing
2 changed files
with
6 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters