diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-10-12 15:29:18 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-10-14 10:07:21 +0200 |
commit | f3898db4d3a340e5a4245bb86c3291d109ae0349 (patch) | |
tree | 13f2889c76335763eb1f3b353b1f4fa99f074a28 /src | |
parent | 66da41ceacbeb1ecea05ed6c8df112faee9aeeb0 (diff) | |
download | upower-f3898db4d3a340e5a4245bb86c3291d109ae0349.tar.gz |
linux: Don't guess discharging state for devices
If the device state is unknown, don't guess based on the laptop's
power supplies (battery/power line) as it might not be charging
from there.
https://bugs.freedesktop.org/show_bug.cgi?id=70321#c1
Diffstat (limited to 'src')
-rw-r--r-- | src/linux/up-device-supply.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index 4a4b431..ef40e06 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -720,7 +720,7 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply) /* the battery isn't charging or discharging, it's just * sitting there half full doing nothing: try to guess a state */ - if (state == UP_DEVICE_STATE_UNKNOWN) { + if (state == UP_DEVICE_STATE_UNKNOWN && supply->priv->is_power_supply) { daemon = up_device_get_daemon (device); /* If we have any online AC, assume charging, otherwise |