diff options
author | Bastien Nocera <hadess@hadess.net> | 2019-05-07 13:09:22 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2019-05-07 11:44:22 +0000 |
commit | 71efbf00cac9a4aca8278a62ffe4140f63ed763b (patch) | |
tree | fced4d3c33ba3c99c0357bd52417da2d7bb6077c | |
parent | 61028d84d80775f69c78de359f66e11cdd2e768d (diff) | |
download | upower-71efbf00cac9a4aca8278a62ffe4140f63ed763b.tar.gz |
linux: Start polling for unknown device batteries too
This check is supposed to start a poll for 1) batteries embedded in
external devices 2) batteries when battery polling is not disabled.
Make sure to start the poll for all batteries embedded in devices even
the ones that are just detected as "battery".
-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 181a61c..d7e4423 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -1143,7 +1143,7 @@ up_device_supply_coldplug (UpDevice *device) type != UP_DEVICE_KIND_BATTERY) up_daemon_start_poll (G_OBJECT (device), (GSourceFunc) up_device_supply_refresh); else if (type == UP_DEVICE_KIND_BATTERY && - !supply->priv->disable_battery_poll) + (!supply->priv->disable_battery_poll || !supply->priv->is_power_supply)) up_daemon_start_poll (G_OBJECT (device), (GSourceFunc) up_device_supply_refresh); /* coldplug values */ |