Closed Bug 987071 Opened 11 years ago Closed 11 years ago

[Camera] The screen doesn't going to sleep in the preview gallery

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:1.4+, b2g-v1.4 verified, b2g-v2.0 verified)

VERIFIED FIXED
1.4 S5 (11apr)
blocking-b2g 1.4+
Tracking Status
b2g-v1.4 --- verified
b2g-v2.0 --- verified

People

(Reporter: hyuna.cho82, Assigned: wilsonpage)

References

()

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

* Repro. 1) Camera launch 2) Take some picture 3) Click thumbnail button 4) Open the preview gallery 4) leave with idle Do not going to sleep
Whiteboard: burirun1.4-2
Does this happen on 1.3?
Keywords: qawanted
QA Contact: jschmitt
(In reply to Jason Smith [:jsmith] from comment #1) > Does this happen on 1.3? I was unable to repro this issue on 1.3, the device goes to sleep after idle. Environmental Variables: Device: Buri 1.3 MOZ BuildID: 20140331004004 Gaia: 0d54a796bdaeb96ca7fb63da2166a46b4f8859f2 Gecko: ad91817a1967 Version: 28.0 Firmware Version: V1.2-device.cfg
Keywords: qawanted
I wasn't able to reproduce this on 1.4 Buri using the STR in Comment 0: Gaia 4c3b2f57f4229c5f36f0d8fd399e65f4db88f104 SourceStamp 3aaca223b673 BuildID 20140331000202 Version 30.0a2
I think the reporter filed this on a Madai build - I do this bug reproducing on Buri using: Gaia 26839cb46f856d610b192f5655a8c38a6bfe0829 SourceStamp d8e8f13bd4ae BuildID 20140331040200 Version 31.0a1
Whiteboard: burirun1.4-2
Exact STR to get this bug on current Master: 1. Make sure screen timeout is set to 1 minute 2. Take a picture with camera 3. Select the preview to the left of the shutter button 4. Wait for screen to timeout - it never does
Priority: -- → P1
Assignee: nobody → wilsonpage
Blocks: 983405
Severity: normal → blocker
Keywords: regression
No longer blocks: 983405
Blocks: 983405
Wilson, please work on this first if you don't have any other blockers that are more critical
Attached file pull-request (master) (obsolete) —
Attachment #8400565 - Flags: review?(dmarcos)
Overview of patch: - Found that device is indirectly forced into a 'wakelock' when the camera stream starts flowing. - Added test coverage for viewfinder controller - Added test coverage for related camera functions - Had to rework Camera.prototype.release() to make sure it didn't always reload the camera when the document is visible. Moved logic into CameraController. Still looking into edge-case STR: 1. Move to PreviewGallery 2. Allow device to sleep. 3. Awake 4. Close preview gallery 5. Observe device sleeps - it shouldn't
Attachment #8400565 - Flags: review?(dmarcos) → review+
Could not recreate edge-case. I'm concerned there is still a series of steps that could cause the viewfinder to sleep. But I'm going to keep an eye out and file a follow-up bug if need be.
Looks like you forgot to resolve the bug after landing. But just as well because I was going to re-open it. The patch that landed allows the screen to sleep once while in the preview gallery. But if you then wake it up and unlock the lockscreen it will never go back to sleep again. I think the 'focus' event handler in the camera controller is causing the camera preview stream to start running again. The patch adds code like this: this.app.set('previewGalleryOpen', false); But it never uses the variable it sets on the app. Perhaps it was there so that the camera controller could easily test it when waking up?
Attached file pull-request (master)
Attachment #8400565 - Attachment is obsolete: true
Attachment #8401112 - Flags: review?(dmarcos)
Added one liner to check if preview-gallery is open before starting the stream again on 'focus' event.
Attachment #8401112 - Flags: review?(dmarcos)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
The bug still reproduces on master 1.5 build The device doesn't go to sleep mode after screen timeout 1.5 Environmental Variables: Device: Buri Master BuildID: 20140408040204 Gaia: 1958454595b1fa0e061f0652ae965629993f5708 Gecko: 8883360b1edb Version: 31.0a1 Firmware Version: v1.2-device.cfg
(In reply to sarsenyev from comment #17) > The bug still reproduces on master 1.5 build > The device doesn't go to sleep mode after screen timeout > > 1.5 Environmental Variables: > Device: Buri Master > BuildID: 20140408040204 > Gaia: 1958454595b1fa0e061f0652ae965629993f5708 > Gecko: 8883360b1edb > Version: 31.0a1 > Firmware Version: v1.2-device.cfg Wilson - Can you confirm?
Flags: needinfo?(wilsonpage)
Requesting 1.4 uplift.
blocking-b2g: --- → 1.4?
Flags: needinfo?(wilsonpage) → needinfo?(hkoka)
Tested working correctly. Device stays awake when taking pictures and sleeps when preview-gallery is open with: - Helix - Nexus4 - Hamachi Although, I was once able to get my Hamachi into a state where it would *never* sleep in *any* app. I tried repeatedly, but was not able to get my device back into this state.
sarsenyev, can you verify if this bug is fixed after this patch gets uplifted to 1.4? please also test this on master as well.
blocking-b2g: 1.4? → 1.4+
Flags: needinfo?(sarsenyev)
Whiteboard: verifyme
Flags: needinfo?(hkoka)
Attached file log492014.txt
After further research the bug still reproduces on the latest build 1.4 and master builds I tested with 2 scenarios The bug doesn't reproduce when: From a preview image I go to the gallery, then after 1 minute the device goes to "sleep" mode !!! But the bug reproduces when: But when I stay on the preview image, then the device stays idle As a proof I was shoot a video and attached a log file STR: 1. Make sure screen timeout is set to 1 minute 2. Take a picture with camera 3. Select the preview to the left of the shutter button Actual result: Wait for screen to timeout - it never does Expected result: Screen goes to sleep after timeout 1.4 Environmental Variables: Device: Buri 1.4 MOZ BuildID: 20140409000202 Gaia: 26983f356ecb1bcf30e862d334b5de790071803e Gecko: e450e07e3a58 Version: 30.0a2 Firmware Version: v1.2-device.cfg 1.5 Environmental Variables: Device: Buri 1.5 Master BuildID: 20140409040202 Gaia: 650e8c2c611ed07495d3bf3769f44a0efd88a492 Gecko: 5811efc11011 Version: 31.0a1 Firmware Version: v1.2-device.cfg
Flags: needinfo?(sarsenyev)
The YouTube video is pretty long, you can skip to 1 min to verify the device stays idle
Wilson - Can you check the analysis above?
Flags: needinfo?(wilsonpage)
I don't know what's going on. I've also uploaded a video to prove that I'm not going insane. Can you confirm that your devices sleep within other apps, such as Homescreen? https://www.youtube.com/watch?v=S-ZV1ZqAl-U
Flags: needinfo?(wilsonpage) → needinfo?(sarsenyev)
Yes, the screen goes to sleeping mode with other scenarious I tested on 2 different devices and I am hitting the same issue, screen is not going to sleep mode, also I noticed after the bug reproduces the sleeping mode does't work at all, the devices needs to be restarted to make it work. I will keep "needinfo" tag, to verify when the patch will be uplifted on 1.4
Verified the bug is fixed on the latest 1.4 and master builds. The screen goes to sleeping mode in "preview gallery" after timeout 1.4 Environmental Variables: Device: Buri 1.4 MOZ BuildID: 20140410000201 Gaia: 9b2da43dfee3792cd311ae55f0b06272313208f0 Gecko: 9d9ead7d6afa Version: 30.0a2 Firmware Version: v1.2-device.cfg 1.5 Environmental Variables: Device: Buri 1.5 MOZ BuildID: 20140410040201 Gaia: 9d0b1bdf746823a94b13e6574c1d8304dc584763 Gecko: 690c810c8e3e Version: 31.0a1 Firmware Version: v1.2-device.cfg
Status: RESOLVED → VERIFIED
Flags: needinfo?(sarsenyev)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: