mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-01-17 12:50:24 +01:00
read-only-mirror of https://gitlab.freedesktop.org/upower/upower
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 |
||
|---|---|---|
| doc | ||
| etc | ||
| libupower-glib | ||
| m4 | ||
| po | ||
| policy | ||
| rules | ||
| src | ||
| tools | ||
| .gitignore | ||
| AUTHORS | ||
| autogen.sh | ||
| configure.ac | ||
| COPYING | ||
| HACKING | ||
| Makefile.am | ||
| NEWS | ||
| README | ||
| RELEASE | ||
| upower-glib.pc.in | ||
=============== UPower =============== Requirements: glib-2.0 >= 2.6.0 gio-2.0 >= 2.16.1 dbus-1 >= 1.0 dbus-glib-1 >= 0.76 gudev-1.0 >= 001 polkit-gobject-1 >= 0.91 libusb UPower is an abstraction for enumerating power devices, listening to device events and querying history and statistics. Any application or service on the system can access the org.freedesktop.UPower service via the system message bus.