diff options
-rw-r--r-- | src/linux/up-device-supply.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index 85c6f9f..4a2f44a 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -861,6 +861,11 @@ up_device_supply_refresh_device (UpDeviceSupply *supply) state = up_device_supply_get_state (native_path); + /* Override whatever the device might have told us + * because a number of them are always discharging */ + if (percentage == 100.0) + state = UP_DEVICE_STATE_FULLY_CHARGED; + /* reset unknown counter */ if (state != UP_DEVICE_STATE_UNKNOWN) { g_debug ("resetting unknown timeout after %i retries", supply->priv->unknown_retries); |