Last Comment Bug 703610 - Return level=1.0 when the battery is full (Battery API UPower backend)
: Return level=1.0 when the battery is full (Battery API UPower backend)
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla11
Assigned To: Mounir Lamouri (:mounir)
: Andrew Overholt [:overholt]
Depends on:
Blocks: 696041
  Show dependency treegraph
Reported: 2011-11-18 08:01 PST by Mounir Lamouri (:mounir)
Modified: 2012-02-01 13:58 PST (History)
0 users
mounir: in‑testsuite?
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (2.05 KB, patch)
2011-11-18 08:01 PST, Mounir Lamouri (:mounir)
cjones.bugs: review+
mounir: checkin+
Details | Diff | Splinter Review

Description User image Mounir Lamouri (:mounir) 2011-11-18 08:01:26 PST
Created attachment 575462 [details] [diff] [review]
Patch v1

There are some special cases where level might be very close to 1.0 (like 0.99xxxxx) but the battery will be considered as full by upower. We should just consider that the level is equal to 1.0 in that case to prevent returning contradictory informations (chargingTime = 0.0 but level != 1.0).
Comment 1 User image Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2011-11-21 23:20:15 PST
Comment on attachment 575462 [details] [diff] [review]
Patch v1

Makes sense.
Comment 2 User image Ed Morley [:emorley] 2011-11-22 09:07:39 PST

Note You need to log in before you can comment on or make changes to this bug.