Open Bug 1638889 Opened 4 years ago Updated 3 years ago

While remote profiling/debugging, prevent device's screen from going to sleep

Categories

(DevTools :: about:debugging, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: Harald, Unassigned)

References

(Blocks 2 open bugs)

Details

User Story

When remote debugging my site on my phone, I want the screen to stay on even while I don't interact with it, so that I can focus on my DevTools without repeated taps just to keep the screen.

Parity with Chrome and making Fenix testing + profiling easier

Snorp, is this something we can solve in GeckoView or which component would you recommend?

Flags: needinfo?(snorp)

Yeah, devtools just needs to grab a screen wakelock. It looks like we might still have the DOM wakelock API available, so it's worth trying that too.

I would say this isn't a GeckoView task, but we can help guide if necessary.

Flags: needinfo?(snorp)

It looks like we explicitely skip android here: https://searchfox.org/mozilla-central/source/devtools/server/actors/device.js#82-91 maybe all we need is just to remove that line?

It looks like we explicitely skip android here

Isn't it an explicit only-Android?

So it looks like bug 1492736 might have landed this for when the remote toolbox is open.

The report was specifically calling out profiling; which I just clarified. So maybe the existing code could be expanded to also work when remote debugging page for a device is open? Afaik the other bug does mention the device actor, so I have to verify which cases are already covered.

Summary: While remote debugging, prevent device's screen from going to sleep → While remote profiling/debugging, prevent device's screen from going to sleep

Isn't it an explicit only-Android?

ah sorry I didn't parse the code correctly, you're correct it executes only on android. Yeah then it sounds like that code should work for you :)

Julian, should this work with the device connected and the profiler open; or does the remote toolbox need to be open?

Flags: needinfo?(jdescottes)

Even though an explicit API would have been clearer, we create the Device actor as soon as about:debugging connects to a remote device.
So in theory it should work without the toolbox.

Flags: needinfo?(jdescottes)
You need to log in before you can comment on or make changes to this bug.