Closed Bug 1190243 Opened 10 years ago Closed 10 years ago

Update gaia battery api to use new W3C draft

Categories

(Firefox OS Graveyard :: Gaia, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wcpan, Assigned: zbraniecki)

References

Details

Attachments

(2 files)

Please see bug 1050749. Use navigator.getBattery() instead of navigator.battery.
Would you help to make the change? Thank you.
Flags: needinfo?(gandalf)
Yes, taking!
Assignee: nobody → gandalf
Flags: needinfo?(gandalf)
Attached file pull request
Attachment #8642793 - Attachment description: pull → pull request
The patch is mostly complete. It passes almost all Gu tests except of two. I need a test B2G build to test it further. Is there an option we'll get a transition period when both, navigator.battery and navigator.getBattery will work? This would enable us to transition without having to land risky patches and trying to narrow down the window when all our builds fail.
Flags: needinfo?(wpan)
According to bug 1050749 comment 22 and bug 1050749 comment 23, I guess we just have to land these patches in the same time, or we'll need to decide when to remove the transition.
Flags: needinfo?(wpan)
Bug 1050749 has been landed, I think now it will be easier to make the transition.
Can we land this patch? or this is no longer needed for gaia?
Flags: needinfo?(gandalf)
Comment on attachment 8642793 [details] [review] pull request This patch migrates all ./apps to use the new API. I tested all unit tests that I touch and they all pass green locally.
Flags: needinfo?(gandalf)
Attachment #8642793 - Flags: review?(fabrice)
Attachment #8642793 - Flags: review?(fabrice) → review+
Comment on attachment 8731807 [details] [review] [gaia] zbraniecki:1190243-update-battery-api-tv > mozilla-b2g:master And the TV counterpart, much smaller :)
Attachment #8731807 - Flags: review?(rchien)
Comment on attachment 8731807 [details] [review] [gaia] zbraniecki:1190243-update-battery-api-tv > mozilla-b2g:master Looks great to me for that small promisify patch :)
Attachment #8731807 - Flags: review?(rchien) → review+
Commit: https://github.com/mozilla-b2g/gaia/commit/5514c1b4cc674930bf1aa98ee98643dcf418bd82 :wcp - I believe you can remove navigator.battery now! :)
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(wpan)
Resolution: --- → FIXED
I created bug 1259335 to track the API removal.
Flags: needinfo?(wpan)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: