Closed
Bug 856494
Opened 12 years ago
Closed 12 years ago
[Camera] mozvisibilitychange event is not received on phone lock.
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(blocking-b2g:tef+)
People
(Reporter: hanj.kim25, Unassigned)
References
Details
(Whiteboard: [TD-9534])
1. Title : [Camera] mozvisibilitychange event is not received on phone lock.
2. Precondition : Launch Camera app.
3. Tester's Action : Press Power button to lock the phone.
4. Detailed Symptom (ENG.) : mozvisibilitychange event is not received, therefore it does not call Camera.stopPreview();. This results in battery drain.
5. Expected : Camera.stopPreview(); should be called on phone lock and save battery.
6. Reproducibility: Y
1)Frequency Rate : 100%
This is a regression from a patch 828283.
The Camera app listens to the 'mozvisibilitychange' event. When a phone is locked, it calls the Camera.stopPreview(). Because this patch prevents from sending the 'mozvisibilitychange' event to the Camera app, the Camera app doesn't call stopPreview even when a phone is locked and results in battery drain. I'm reopening this bug..
In window_manager.js
case 'lock':
- setVisibilityForCurrentApp(false);
+ // If the audio is active, the app should not set non-visible
+ // otherwise it will be muted.
+ if (!normalAudioChannelActive) {
+ setVisibilityForCurrentApp(false);
+ }
+ resetDeviceLockedTimer();
break;
And in camera.js
document.addEventListener('mozvisibilitychange', function() {
if (document.mozHidden) {
Camera.stopPreview();
Camera.cancelPick();
Camera.cancelPositionUpdate();
if (this._secureMode) // If the lockscreen is locked
Filmstrip.clear(); // then forget everything when closing camera
} else {
Camera.startPreview();
}
});
Is this still happening? I think bug 853454 should have fixed this.
Comment 3•12 years ago
|
||
qawanted to check if this issue is fixed in v1.0.1 as Jonas believes (comment 2)
Keywords: qawanted
Comment 4•12 years ago
|
||
Tested on Unagi w/ nightly build on the pvtbuild server.
===== VERSION =====
<!-- Mercurial-Information: <project name="releases/mozilla-b2g18_v1_0_1" path="gecko" remote="hgmozillaorg" revision="ccec751a468e"/> -->
<project name="gecko.git" path="gecko" remote="mozillaorg" revision="630fdb0e9617d59ff65c649ad68d0c4735db6bc7"/>
<!-- Mercurial-Information: <project name="integration/gaia-1_0_1" path="gaia" remote="hgmozillaorg" revision="9b38896f58ca"/> -->
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="af7447ccc38559868a2bd1dcfa03b4444ef5591e"/>
Cannot reproduce it. WFM.
Please reopen it if it happens again.
Updated•12 years ago
|
Target Milestone: --- → Leo QE1 (5may)
You need to log in
before you can comment on or make changes to this bug.
Description
•