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)
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla11
Assigned To: Mounir Lamouri (:mounir)
:
: Andrew Overholt [:overholt]
Mentors:
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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
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 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 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 Ed Morley [:emorley] 2011-11-22 09:07:39 PST
https://hg.mozilla.org/mozilla-central/rev/c5b6c614b01d

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