linux: Treat the battery state 'not charging' as PENDING_CHARGE

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=826215
This commit is contained in:
Richard Hughes 2012-05-30 16:16:50 +01:00
parent 944118a879
commit a75501f9d1

View file

@ -620,6 +620,8 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
state = UP_DEVICE_STATE_EMPTY;
else if (g_ascii_strcasecmp (status, "unknown") == 0)
state = UP_DEVICE_STATE_UNKNOWN;
else if (g_ascii_strcasecmp (status, "not charging") == 0)
state = UP_DEVICE_STATE_PENDING_CHARGE;
else {
g_warning ("unknown status string: %s", status);
state = UP_DEVICE_STATE_UNKNOWN;