Commit 71efbf00 authored by Bastien Nocera's avatar Bastien Nocera

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".
parent 61028d84
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment