Closed Bug 1510670 Opened 6 years ago Closed 4 years ago

Performance Warning: Using wakeLock without timeout

Categories

(GeckoView :: General, defect, P5)

Unspecified
Android
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: fluffyemily, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: good-first-bug)

Wakelocks have two acquire methods: one with a timeout, and one without. You should generally always use the one with a timeout. A typical timeout is 10 minutes. If the task takes longer than it is critical that it happens (i.e. can't use JobScheduler) then maybe they should consider a foreground service instead (which is a stronger run guarantee and lets the user know something long/important is happening). Affected Class: GeckoAppShell
Those are requested on behalf of Gecko, most likely/commonly for media playback and therefore I'd say that there isn't any point in using a timeout.
Keywords: good-first-bug
OS: Unspecified → Android
Priority: -- → P5
Product: Firefox for Android → GeckoView

Currently whenever we request a wakelock, that is because Firefox is playing audio/video, so there is no timeout mechanism existing.

Blocks: wakelock
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.