Closed Bug 818840 Opened 13 years ago Closed 12 years ago

Followup to bug 817888 - requesting a screen wake lock does not turn the screen on

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: etienne, Assigned: timdream)

Details

Not sure if this is by design or not. See bug 817888, comment 9.
Assignee: nobody → timdream+bugs
Component: General → Gaia::System
De-assign myself since have not actively working on this.
Assignee: timdream → nobody
Hi Etienne, I finally found the reason why the screen is not turned on. So the lock state from Gecko is as follows * unlocked * locked-foreground * locked-background When a lock is present on the app frame, Gecko will give us additional information on whether or not the app frame is visible, hence the "foreground" and "background" suffix. We only actually consider the screen is locked if the app is in foreground (that is, document.hidden === false because the frame has been setVisible(true)) However, when the screen is off, no frame, including the system app, is considered being at the foreground by Gecko. Hence any wake lock created when the screen is off only take us to "locked-background" state, therefore the screen is not turned on. So we could say "requesting a screen wake lock does not turn the screen on" is by design. Whether or not to change the design, is, however, can be discussed. I don't find a strong use case for it yet (if there are we would have fixed this bug a long time ago), so I recommend we WONTFIX this bug. Also, turning on the screen with locked-background state means the ScreenManager (or the part of it being refactored out) would have to be smart enough to know we reach 'locked-background' from 'unlocked' or 'locked-foreground', something that is complex. I am sorry that I land a piece of confusing if block that we will never reach. I will remove that code soon.
Assignee: nobody → timdream
Flags: needinfo?(etienne)
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #2) > I am sorry that I land a piece of confusing if block that we will never > reach. I will remove that code soon. To be removed in bug 1081630.
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: needinfo?(etienne)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.