indicator-power doesn't always choose the correct primary device

Bug #1071645 reported by Charles Kerr on 2012-10-26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
Charles Kerr

Bug Description

According to the, indicator-power should use this reasoning to decide which device to show in its title and icon:

> The menu title should tell you at a glance what you need to know most: what device will lose power soonest (and optionally when), or otherwise which device will take longest to charge (and optionally how long it will take). More detailed information can be accessed inside the menu itself.

But the following unit test fails:

> /* Both discharging, same charge %, different times left before empty.
> Confirm that the one with less time is chosen. */
> set_device_charge_state (a, UP_DEVICE_STATE_DISCHARGING, 99, 50.0);
> set_device_charge_state (b, UP_DEVICE_STATE_DISCHARGING, 100, 50.0);
> ASSERT_EQ (a, indicator_power_choose_primary_device(devices));

Related branches

Charles Kerr (charlesk) on 2012-10-26
Changed in indicator-power:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Charles Kerr (charlesk)
Charles Kerr (charlesk) on 2012-10-26
Changed in indicator-power:
status: In Progress → Fix Committed
Charles Kerr (charlesk) on 2012-10-28
Changed in indicator-power:
status: Fix Committed → Fix Released
milestone: none → 12.10.4
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers