upower/src
Martin Pitt a786d2fd16 Fix "unknown" battery status guessing to not be recursive
Stop querying the global "on-battery" property when trying to guess the status
of a battery which reports as "unknown", as "on-battery" is itself defined in
terms of the states of the individual batteries. Instead, guess the state based
on whether we have any AC available; if so, we can reasonably assume
charging/discharging based on whether any AC is online. If no AC is present,
assume discharging (as we did before), but only if we have only one battery.

Stop guessing for the case where we don't have any AC device, "unknown" battery
state, and multiple batteries, as then we can't know which battery is currently
discharging.

https://bugs.freedesktop.org/show_bug.cgi?id=24371
2011-04-26 11:50:36 +02:00
..
dummy Port from EggDebug to the GLib built-in logging framework 2010-11-01 11:28:31 +00:00
freebsd Port from EggDebug to the GLib built-in logging framework 2010-11-01 11:28:31 +00:00
linux Fix "unknown" battery status guessing to not be recursive 2011-04-26 11:50:36 +02:00
openbsd openbsd: fix warning, and set lid-present to no 2011-03-21 18:40:25 +00:00
.gitignore src/.gitignore: Fix file name 2011-04-15 18:06:45 +02:00
Makefile.am fix up-self-test build 2011-04-13 11:19:44 +02:00
org.freedesktop.UPower.conf.in Add support for controlling leds keyboard backlights 2010-10-11 11:03:06 +01:00
org.freedesktop.UPower.Device.xml Rename the PolicyKit rules from org.freedesktop.devicekit.power to org.freedesktop.upower 2010-01-18 17:05:25 +00:00
org.freedesktop.UPower.KbdBacklight.xml Add support for controlling leds keyboard backlights 2010-10-11 11:03:06 +01:00
org.freedesktop.UPower.QoS.xml trivial: Rename a few 'DeviceKit-power' strings we missed 2010-05-28 15:00:07 +01:00
org.freedesktop.UPower.service.in Rename the man pages and rename the main daemon binary name 2010-01-21 14:47:21 +00:00
org.freedesktop.UPower.Wakeups.xml trivial: Rename a few 'DeviceKit-power' strings we missed 2010-05-28 15:00:07 +01:00
org.freedesktop.UPower.xml Add a LidForceSleep property to ensure that we don't melt any laptops 2011-02-02 13:44:09 +00:00
up-backend.h Get the powersave command from the backend rather than hardcoding Linux specifics 2010-07-07 10:07:37 +01:00
up-config.c Add a config option 'EnableWattsUpPro' to disable the Watts Up Pro device 2011-03-14 11:01:12 +00:00
up-config.h Add a config option 'EnableWattsUpPro' to disable the Watts Up Pro device 2011-03-14 11:01:12 +00:00
up-daemon.c Add option to run daemon on the session bus for testing 2011-04-26 11:50:36 +02:00
up-daemon.h Add option to run daemon on the session bus for testing 2011-04-26 11:50:36 +02:00
up-device-list.c Port from EggDebug to the GLib built-in logging framework 2010-11-01 11:28:31 +00:00
up-device-list.h devkit-power-gobject/up-enum.h be gone 2010-02-06 13:46:03 +00:00
up-device.c Add option to run daemon on the session bus for testing 2011-04-26 11:50:36 +02:00
up-device.h trivial: DkpDevice -> UpDevice (no ABI or API break) 2010-01-18 12:49:30 +00:00
up-history.c UpHistory: Add method to set history dir 2010-11-04 23:29:34 -04:00
up-history.h UpHistory: Add method to set history dir 2010-11-04 23:29:34 -04:00
up-kbd-backlight.c Add option to run daemon on the session bus for testing 2011-04-26 11:50:36 +02:00
up-kbd-backlight.h Add support for controlling leds keyboard backlights 2010-10-11 11:03:06 +01:00
up-main.c Add option to run daemon on the session bus for testing 2011-04-26 11:50:36 +02:00
up-marshal.list trivial: Rename a lot of the source files from dkp-foo to up-foo, no API or ABI changes 2010-01-18 12:26:55 +00:00
up-native.h trivial: DkpNative -> UpNative (no ABI or API break) 2010-01-18 13:12:37 +00:00
up-polkit.c Port from EggDebug to the GLib built-in logging framework 2010-11-01 11:28:31 +00:00
up-polkit.h Fix double D-BUS return in up_daemon_*_allowed 2010-08-19 13:04:38 +02:00
up-qos.c Add option to run daemon on the session bus for testing 2011-04-26 11:50:36 +02:00
up-qos.h Update the Free Software Foundation address 2010-01-27 16:27:15 +00:00
up-self-test.c selftest: Globally set configuration path 2011-04-13 11:32:32 +02:00
up-wakeups.c Add option to run daemon on the session bus for testing 2011-04-26 11:50:36 +02:00
up-wakeups.h Update the Free Software Foundation address 2010-01-27 16:27:15 +00:00