summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Poynor2017-11-06 20:14:25 -0600
committerTodd Poynor2018-02-05 13:48:30 -0600
commit4d7ee2ebbb17b0f43aa19304f28efff88c04a2a3 (patch)
treea44e7aa04623533b18e2005cf9046cf64b996ab8 /healthd/include
parent94e930551169f95593cd8732f8d9dcb452902ed0 (diff)
downloadplatform-system-core-4d7ee2ebbb17b0f43aa19304f28efff88c04a2a3.tar.gz
platform-system-core-4d7ee2ebbb17b0f43aa19304f28efff88c04a2a3.tar.xz
platform-system-core-4d7ee2ebbb17b0f43aa19304f28efff88c04a2a3.zip
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 Merged-In: I14cb3b685e8130428e417e7d08c4246f7415210a Change-Id: I64bd4431af10f3d232f36fcf8d356b6d88b08013
Diffstat (limited to 'healthd/include')
-rw-r--r--healthd/include/healthd/BatteryMonitor.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/healthd/include/healthd/BatteryMonitor.h b/healthd/include/healthd/BatteryMonitor.h
index 8865a7d82..194e6679d 100644
--- a/healthd/include/healthd/BatteryMonitor.h
+++ b/healthd/include/healthd/BatteryMonitor.h
@@ -48,7 +48,6 @@ class BatteryMonitor {
48 struct healthd_config *mHealthdConfig; 48 struct healthd_config *mHealthdConfig;
49 Vector<String8> mChargerNames; 49 Vector<String8> mChargerNames;
50 bool mBatteryDevicePresent; 50 bool mBatteryDevicePresent;
51 bool mAlwaysPluggedDevice;
52 int mBatteryFixedCapacity; 51 int mBatteryFixedCapacity;
53 int mBatteryFixedTemperature; 52 int mBatteryFixedTemperature;
54 struct BatteryProperties props; 53 struct BatteryProperties props;