Since browser doesn't have the wakelock implementation, we only enable geolocation wakelock in firefox OS.
Only enable Bug 1216148's behavior when there is a wakelock support.
Remove the redundant line of #include "mozilla/Preferences.h" in previous patch
Attachment #8714200 - Flags: review?(kchen) → review+
Comment on attachment 8714200 [details] [diff] [review] Only enable Bug 1216148's behavior when there is a wakelock support Approval Request Comment [Feature/regressing bug #]: bug 1216148 [User impact if declined]: web content cannot use geolocation when the page is visibilityState=hidden. We don't plan to ship this on Firefox yet so this patch disables it. [Describe test coverage new/current, TreeHerder]: manually tested [Risks and why]: no [String/UUID change made/needed]: no
Attachment #8714200 - Flags: approval-mozilla-aurora?
1) Is there a way to turn this off as a user, e.g. if I prefer working GPS tracking to a little saved power? 2) Is there a way for "hosted apps" (websites used like apps) to use wakelocks to keep GPS working in the background?
Hey Robert, Your idea sounds feasible and it sounds like another power manager on smartphone that could be able to turn on/off every apps' power consumption behavior. But this is another work I think. And I am not working on this though. Right now, we leave app developers to decide if this app is able to track in background or not. We don't ship any feature that leave this power consumption issue to users yet. thanks!
(In reply to Robert Kaiser (:firstname.lastname@example.org) from comment #6) > 1) Is there a way to turn this off as a user, e.g. if I prefer working GPS > tracking to a little saved power? Not currently. Maybe this could be implemented as a per-app or per-origin permission settings like on iOS. > 2) Is there a way for "hosted apps" (websites used like apps) to use > wakelocks to keep GPS working in the background? navigator.mozRequestWakeLock is exposed to content on FxOS so any web content can opt to keep GPS working in the background.
Comment on attachment 8714200 [details] [diff] [review] Only enable Bug 1216148's behavior when there is a wakelock support Limits some GLS changes in 46 to FxOS. Please uplift to aurora.
Attachment #8714200 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
has problems uplifting to aurora: grafting 326532:f3c3367ba057 "Bug 1240664 - Only enable bug 1216148's behavior when there is a wakelock support. r=kanru" merging dom/geolocation/nsGeolocation.cpp warning: conflicts while merging dom/geolocation/nsGeolocation.cpp! (edit, then use 'hg resolve --mark') abort: unresolved conflicts, can't continue (use hg resolve and hg graft --continue) could you take a look ? thanks!
Hey Carsten, It seems that it's already been merged into aurora 2 days ago as below http://hg.mozilla.org/releases/mozilla-aurora/rev/31ac86b9b417 Anyway thank you so much.
You need to log in before you can comment on or make changes to this bug.