Return level=1.0 when the battery is full (Battery API UPower backend)

RESOLVED FIXED in mozilla11

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

Trunk
mozilla11
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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).
Attachment #575462 - Flags: review?(jones.chris.g)
Comment on attachment 575462 [details] [diff] [review]
Patch v1

Makes sense.
Attachment #575462 - Flags: review?(jones.chris.g) → review+
(Assignee)

Updated

6 years ago
Flags: in-testsuite?
Whiteboard: [needs review]
Target Milestone: --- → mozilla11
(Assignee)

Updated

6 years ago
Attachment #575462 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/c5b6c614b01d
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.