summaryrefslogtreecommitdiffstats
path: root/healthd
Commit message (Collapse)AuthorAgeFilesLines
* healthd: Adds fake battery properties for devices with no battery.Ruchi Kandoi2015-10-122-1/+19
| | | | | | | | | | | | | | Devices which have no battery and are always plugged in will not have any battery property initialized. This causes the 'stable power' to never be switched which is required for updating apps. This change recognizes such a device and manually sets the battery to 100% and charger status to connected to AC mains. It will also fake the battery temperature. Bug: 24258855 Change-Id: I98e5ed0dbeb7f2ab6d3802cd7e0f3a269bd8f31f Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* healthd: logd: add timestamp to kernel logged battery messagesMark Salyzyn2015-08-271-5/+29
| | | | | | | | | | | | | | | | | | | | | (cherry pick from commit acb1ddf56c98a75a49b263f99ef07ce361dc4323) Aid monotonic to realtime logging synchronization correction in the Android ecosystem by providing a periodic notification. We now have the following messages in the kernel logs: - PM: suspend entry %Y-%m-%d %H:%M:%S.%09q UTC - PM: suspend exit %Y-%m-%d %H:%M:%S.%09q UTC - Suspended for %s.%03q seconds - healthd: battery l=100 ... %Y-%m-%d %H:%M:%S.%09q UTC Alter klogd to resynchronize on healthd messages as well. NB: Time using strftime format, %q is a reference to fractional second as introduced into log_time strptime method. Bug: 21868540 Change-Id: I854afc0a07dff9c7f26d2b2f68990e52bf90e300
* Show charging speed on KeyguardAdrian Roos2015-07-131-2/+12
| | | | | Bug: 8099739 Change-Id: I2e5c21dd7ec028ce47fb03ab71e74f7fccaa9e36
* resolved conflicts for merge of 6e9b28b2 to masterElliott Hughes2015-04-151-4/+4
|\ | | | | | | Change-Id: Icd1bbc33283c504691934256a4cf5989868d3caf
| * Move away from gr_surface.Elliott Hughes2015-04-151-4/+4
| | | | | | | | Change-Id: Icfa81b18e5c99e3ffc5c55aba1d435eb26eb8680
* | Fix print format mismatch in 64-bit mode.Chih-Hung Hsieh2015-02-241-1/+1
| | | | | | | | Change-Id: I7f0b0ed87e4e544517be66418ff76596a084976f
* | am 0e0fbdd1: am 492dd1e5: Merge "Remove obsolete BUILD_TINY_ANDROID check ↵Elliott Hughes2015-01-241-4/+0
|\ \ | |/ | | | | | | | | | | from healthd makefile" * commit '0e0fbdd1fcef71e653ad2d988649f6259b304fc2': Remove obsolete BUILD_TINY_ANDROID check from healthd makefile
| * am 492dd1e5: Merge "Remove obsolete BUILD_TINY_ANDROID check from healthd ↵Elliott Hughes2015-01-241-4/+0
| |\ | | | | | | | | | | | | | | | | | | makefile" * commit '492dd1e5c1c47bc8a804b58bed941c8eaa94d9a3': Remove obsolete BUILD_TINY_ANDROID check from healthd makefile
| | * Remove obsolete BUILD_TINY_ANDROID check from healthd makefileTrevor Drake2015-01-241-4/+0
| | | | | | | | | | | | Change-Id: I7e23236e7725891d07368dd8ea8d667014d7dc78
* | | am 38c3386a: resolved conflicts for merge of 03be4928 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-253-8/+0
|\ \ \ | |/ / | | | | | | | | | * commit '38c3386a6cd44789f540fb9700c284345e7269e3': Healthd: Remove unused variables
| * | resolved conflicts for merge of 03be4928 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-253-8/+0
| |\ \ | | |/ | | | | | | Change-Id: I7c72ed2c54ceae19c9dfe8b2e1707f869faad110
| | * Healthd: Remove unused variablesAndreas Gampe2014-11-243-8/+0
| | | | | | | | | | | | | | | | | | For build-system CFLAGS clean-up, remove unused variables. Change-Id: Ifc5884518bfdb744ea9823b98db544dbe59c20d2
| * | am e11d81b3: Merge "Update calls to IInterface::asBinder()"Marco Nelissen2014-11-171-5/+5
| |\ \ | | |/ | | | | | | | | | * commit 'e11d81b37c119ec3d67c1fe60779d510d21e6a14': Update calls to IInterface::asBinder()
| | * Update calls to IInterface::asBinder()Marco Nelissen2014-11-171-5/+5
| | | | | | | | | | | | | | | | | | to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
* | | Update calls to IInterface::asBinder()Marco Nelissen2014-11-141-5/+5
| | | | | | | | | | | | | | | | | | to use the new static version. Change-Id: Idcf82bb8c0b4b141475abb5330b08409dc14a600
* | | Charger: Improve screen on/off scenariosRuchi Kandoi2014-10-221-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In charger-mode, power off/on screen as required, for efficient charging. Turn on screen on power-key press rather than on key-release. On charge-cable removal, kick animation to show the correct battery level. Change-Id: I74eaf8681466c44dbd76a820adf154053e0fc43a Signed-off-by: Pavan Kumar S <pavan.kumar.s@intel.com> Signed-off-by: Jenny TC <jenny.tc@intel.com> Signed-off-by: Yong Yao <yong.yao@intel.com>
* | | Charger: Add a Charger to Android transition thresholdRuchi Kandoi2014-10-223-2/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Existing code allows charger-mode to exit to Android even with 0% battery. This might lead to more battery discharge while booting to Android, especially if only USB-charger is connected, and thus certain features/components not functioning as expected in Android. This patch adds a configurable parameter to improve the user experience by preventing the charger exit till battery capacity is good enough to boot Android Change-Id: I56a283243551373e962ac562f25eaf11f07666c3 Signed-off-by: Pavan Kumar S <pavan.kumar.s@intel.com> Signed-off-by: Jenny TC <jenny.tc@intel.com> Signed-off-by: Yong Yao <yong.yao@intel.com>
* | healthd: Add callback for screen_on to the healthdHALRuchi Kandoi2014-09-263-26/+22
| | | | | | | | | | | | | | | | Adds a callback to the healthdHAL which can check for device specific properties to decide if the screen should turn on. Change-Id: I543e7729ecb291157df4d3be1bd718f8af01ac40 Signed-off-by: Ruchi Kandoi<kandoiruchi@google.com>
* | am 301a907f: Merge "healthd: charger: Run animation even if capacity is 0" ↵Ruchi Kandoi2014-09-241-1/+1
|\ \ | |/ | | | | | | | | | | into lmp-dev * commit '301a907f28570ff1627e30a37069e6c5ab6a4b75': healthd: charger: Run animation even if capacity is 0
| * healthd: charger: Run animation even if capacity is 0Devin Kim2014-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | If charger is connected and battery capacity is 0, charging animation should run. The device would be booted up even if capacity is 0 in off-mode charging. At that time, it would take some time to be 1 from 0 for capacity if you use USB charger. Bug: 17606689 Change-Id: I37e0f1b6ab0ee1f6d833882e169bf3ea06cf2399
* | healthd: use warning level for info logsTodd Poynor2014-09-232-20/+20
|/ | | | | | | To allow healthd/charger info to appear in systems where the loglevel has been bumped to squelch chatty drivers. Change-Id: I4ab135765700d7584a1ce5d972ea473d77f299f8
* healthd: charger: fix check for charger connected to enter suspendTodd Poynor2014-08-181-1/+1
| | | | | | | | | | Logic for this check was inadvertently reversed when porting this from the charger daemon to healthd. Request suspend if a charegr is connected, else stay out of suspend waiting for a charger connect or power off if none. Bug: 17112463 Change-Id: Iffdb6dbcd0d0a2a614ff8f50bf5f2e22e1ad552f
* healthd: Reports arbitrary numbers for capacity and temperature whenRuchi Kandoi2014-07-111-5/+7
| | | | | | | | | connected to fake battery. Detects if the device is attached to a fake battery if yes, healthd reports 42% battery charge and 42.2 degrees temperature. Change-Id: I2508fd91c8d3848ea64f57ab59d20be1c2817913
* healthd: fix 64-bit buildColin Cross2014-07-011-1/+1
| | | | | | int64_t needs to be printed with PRId64 Change-Id: If59b60bac71856e4266d459d159a570961e7340a
* charger: leave screen off when entered with very low batteryTodd Poynor2014-06-301-7/+23
| | | | Change-Id: I28e3d6adaf4bb59d14eca7103d7b063d54a41c75
* resolved conflicts for merge of 079c637f to masterRiley Andrews2014-06-231-2/+12
|\ | | | | | | Change-Id: Iab9a857026de954d7497d6b0eaf3751d2d3904c7
| * healthd: UEVENT_MSG_LEN is changed from 1048 to 2048 in compliance withRuchi Kandoi2014-06-191-1/+1
| | | | | | | | | | | | | | BUFFER_LEN in the kobject_uevent in kernel. Change-Id: Ia9f4b520847d40fe4e032875dfb79bd063bc723d Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* | healthd: Avoid animation while not charging.Ruchi Kandoi2014-06-231-13/+22
| | | | | | | | | | | | | | | | | | At present, charging animation runs irrespective of whether charger is connected or not. When the charger is disconnected, device does not shutdown for 10sec. Charger animation during this period should be avoided. Change-Id: I34dc5028522ca199d50a1a1b684b035b2d81ef68
* | resolved conflicts for merge of de7bdc94 to masterRuchi Kandoi2014-06-201-1/+1
| | | | | | | | Change-Id: I6dc10c8220c0984b31a05534b576ca25afdf5383
* | healthd: Set fixed battery level and temperature via propertiesTodd Poynor2014-05-222-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | setprop persist.sys.battery.capacity 77 setprop persist.sys.battery.temperature 123 and reboot to cause a fixed battery level of 77% and temperature of 12.3C to be reported to Android. Typically used on power evaluation boards without batteries connected. Bug: 14839868 Change-Id: Ibae5e16429d05891cb0787d74a2fe93b07013699
* | healthd: Add hooks for ENERGY_COUNTER propertyTodd Poynor2014-05-203-1/+10
| | | | | | | | | | Bug: 10118565 Change-Id: Ibabae2a78a600ae37ce9b91da0f5980ee94b05c2
* | healthd: Add ENERGY_COUNTER property placeholder, and 64-bit propertiesTodd Poynor2014-05-161-7/+10
| | | | | | | | | | | | | | Will add healthd HAL support for ENERGY_COUNTER, and support in some HALs, in following CLs. Change-Id: Ife2eaa30473be3a59183c6ce61fdaa61f32dd01b
* | healthd: fix warningsColin Cross2014-05-151-12/+13
| | | | | | | | | | | | Fix a few warnings missed when turning on -Werror Change-Id: I5728664a90d33b95ab3d6ea8823244c59643aedc
* | healthd: Turn on -WerrorMark Salyzyn2014-05-156-13/+14
| | | | | | | | Change-Id: I72caf38008ee7d842dfacd3f58add9bc8e4787e8
* | NULL check in registerListenerNatalie Silvanovich2014-04-301-0/+4
| | | | | | | | | | | | | | Prevents crash in batteryproperties. Now with two times as much NULL checking. Bug: 13730158 Change-Id: Ica083da60c6543431c2d82d46aed48eaccc3b4b4
* | am 43cb7ae6: am 4f362e43: am 835526fd: Merge "Cleanup: warning fixit."Sasha Levitskiy2014-04-121-2/+2
|\ \ | |/ | | | | | | * commit '43cb7ae6c31ced8cd518eab59dfea31ab1ade812': Cleanup: warning fixit.
| * Cleanup: warning fixit.Sasha Levitskiy2014-04-111-2/+2
| | | | | | | | | | | | | | bootable/recovery has a dependent commit: I9adb470b04e4301989d128c9c3097b21b4dea431 Change-Id: Icf23e659265d71d5226d527c2b40cfbc132320ee Signed-off-by: Sasha Levitskiy <sanek@google.com>
* | healthd: Add battery capacity to getPropertyPaul Lawrence2014-03-201-0/+10
| | | | | | | | | | | | | | Add support for BATTERY_PROP_CAPACITY property in getProperty Bug: 11985952 Change-Id: I905cda68f990fa96138a16a11c55f2d902d0bbc1
* | am 706d57b2: am 769c6452: update minui library callDoug Zongker2014-03-181-2/+2
|\ \ | |/ | | | | | | * commit '706d57b2948cc2eec22dc16394cf5582586b4237': update minui library call
* | remove pixelflinger from healthdDoug Zongker2014-03-1111-23/+21
| | | | | | | | | | | | | | | | | | | | | | The minui library has changed to no longer use libpixelflinger. It also offers a more efficient way of storing and loading frames of animation; use it to represent the battery-full state images. Also removes the unused battery_charge.png image. Bug: 12131110 Change-Id: I6cc8b19f36a806c99cda30cc47b5968daf6b333b
* | resolved conflicts for merge of 1fef485f to masterColin Cross2014-02-131-0/+2
|\ \ | |/ | | | | Change-Id: If402e68292a183064afe35cb77a4437682ee373a
* | healthd: charger mode dump previous console from pstoreTodd Poynor2013-12-101-3/+8
| | | | | | | | Change-Id: Id65ffe4f80aa870a1d1f3f3d67c3bb687490c27f
* | healthd: fix runstring option error reportingTodd Poynor2013-11-211-1/+2
| | | | | | | | Change-Id: I548d837afbde8a66826bb2cdb79ede7edda42b1f
* | healthd: remove/rearrange extra battery property handlingTodd Poynor2013-10-221-18/+10
| | | | | | | | Change-Id: I6cc1570e23c1c1468f08579f633997e95327347a
* | healthd: remove service batterypropregTodd Poynor2013-10-221-1/+0
| | | | | | | | Change-Id: Iac24af6a59453686fca145d0814dc5ff045efcec
* | healthd: rename service batterypropreg => batterypropertiesTodd Poynor2013-10-221-0/+1
| | | | | | | | | | | | Part 1 of 2 (to avoid transitory runtime crashes). Change-Id: I40d990ef7ee18cea99e5add39738bbe9fd5701ca
* | healthd: BatteryService dumpstate supportTodd Poynor2013-10-226-5/+61
| | | | | | | | Change-Id: Ia6938b7126751801310632c995af0f96e41f5f64
* | healthd: Fixups for systems without batteries or removable batteriesTodd Poynor2013-10-222-16/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | * Replace unnecessary warnings about missing attributes with a more informative message when no battery devices provided by the system. * Turn off periodic battery checks when no battery devices (thereby reducing unnecessary kernel log spam). * Replace battery properties in log messages with a more informative message when no battery is provided or the battery is removed. Change-Id: I68a514aa7315ae2b5d22cb8861d3c9b1b38035a1
* | healthd: start switchover to BatteryExtraPropertiesTodd Poynor2013-09-301-5/+11
| | | | | | | | Change-Id: I47a24d4284f502858ee929b2cda8881165ef4ef3
* | Install the nonexistent-source symlink as a post-install stepYing Wang2013-09-201-15/+3
| | | | | | | | | | | | | | Previously because /sbin/healthd does not exist on the build host, make always tries to rebuild the symlink even in an already-up-to-date tree. Change-Id: I41201282281476b14eaf4c7d9b2e09fe367c1422