Closed
Bug 975513
Opened 11 years ago
Closed 11 years ago
[B2G][Camera] Rotation not work in camera app after user launched the second camera via mozActivity
Categories
(Firefox OS Graveyard :: Gaia::Camera, defect)
Tracking
(blocking-b2g:1.4+, b2g-v1.4 fixed, b2g-v2.0 unaffected)
Tracking | Status | |
---|---|---|
b2g-v1.4 | --- | fixed |
b2g-v2.0 | --- | unaffected |
People
(Reporter: astole, Assigned: mikeh)
References
()
Details
(Keywords: regression, Whiteboard: dogfood1.4)
Attachments
(2 files)
After the user has used the camera app from the homescreen and then uses the camera app from the lockscreen with a passcode lock, the camera app no longer senses the phone's orientation.
Repro Steps:
1) Updated Buri to BuildID: 20140221040202
2) Make sure to have a passcode enabled
3) Open the camera app from the homescreen
4) Lock the phone (Doesn't matter if camera app is still open or not)
5) Launch the camera app from the lockscreen
6) Press the home button
7) Unlock the phone and launch the camera app
8) Rotate the phone
Actual:
Camera app orientation does not work.
Expected:
When the phone is rotated, the orientation is sensed in the camera app.
Environmental Variables:
Device: Buri v1.4 M/C Mozilla RIL
BuildID: 20140221040202
Gaia: 35365feace970bfc51276428f40a477c9c86b7bb
Gecko: 7010ab83a06e
Version: 30.0a1
Firmware Version: V1.2-device.cfg
Repro frequency: 100%
See attached: Video
Reporter | ||
Updated•11 years ago
|
Updated•11 years ago
|
QA Contact: ckreinbring
Comment 3•11 years ago
|
||
Unable to repro on Buri 1.3 mozilla RIL. Mainly because the last step causes the Camera to load with a blank black screen similar to the one found in bug 950136.
Build ID: 20140221004002
Gecko: https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/e5f25becc0e7
Gaia: 8039a5cb7519adfa81677df577f494c6a4de6140
Platform Version: 28.0
Firmware Version: V1.2-device.cfg
Keywords: qawanted
Updated•11 years ago
|
blocking-b2g: --- → 1.4?
Keywords: regression,
regressionwindow-wanted
Comment 4•11 years ago
|
||
Suspect this is a regression caused by bug 951978 (secure window), or my bug 958425 (stop copying Camera app from system app package), although both have landed weeks ago.
A quick bisect could confirm this.
Flags: needinfo?(gweng)
Comment 5•11 years ago
|
||
I know the possible cause of this. It would be confirmed after I do more check Monday.
Flags: needinfo?(gweng)
Updated•11 years ago
|
Assignee: nobody → gweng
Comment 6•11 years ago
|
||
Actually, the step 4 in STR is incorrect: this bug only happens when you keep the camera open and then lock the screen. If you kill it before you lock the screen (so it's matter to keep the camera open before lock it), the camera launched from the passcode panel would react normally (sensed to the orientation change).
Comment 7•11 years ago
|
||
Update:
I tested the `handleMotionEvent` with some log code:
function handleMotionEvent(e) {
console.log('>> motion in secure: ',
(window.location.hash === '#secure'));
if (!e.accelerationIncludingGravity) {
return;
}
//....
}
The result and test path:
1. Launch camera via homescreen: OK, log with secure == false
2. Launch the secure camera: OK, log with secure == true
3. Unlock and return to the normal canera: NOT OK, log nothing
So it seems that the camera app would handle nothing if we return to it from the lockscreen.
Comment 8•11 years ago
|
||
John mentioned that the 'visibilitychange' may result in that some events and callbacks got de-attached. So I may need to survey it.
Comment 9•11 years ago
|
||
It would also occur when user launch the second camera app via mozActivity:
1. Launch camera via homescreen.
2. Press home and launch SMS
3. Press the attachment button to call the activity screen
4. Choose the Camera
5. The second camera would be sensed to orientation changes
6. Close the SMS, and return to the first camera: it would be broken now.
So the symptom seems irrelevant to LockScreen and SecureWindow, but the duplicated cameras.
I will attach a video to show the case.
Comment 10•11 years ago
|
||
Comment 11•11 years ago
|
||
Sorry the orientation of the video is strange (how ironic!). But you can still see what happened.
Updated•11 years ago
|
Assignee: gweng → nobody
Comment 12•11 years ago
|
||
Hema
Please see if this fits the current 1.4 camera feature list.
Flags: needinfo?(hkoka)
Comment 13•11 years ago
|
||
(In reply to Preeti Raghunath(:Preeti) from comment #12)
> Hema
>
> Please see if this fits the current 1.4 camera feature list.
This is a regression. This was working previously in 1.3. This should be a blocker.
Updated•11 years ago
|
blocking-b2g: 1.4? → 1.4+
Flags: needinfo?(hkoka)
Comment 14•11 years ago
|
||
Please excuse the cluttered regression window, there is one build in between (marked as "Blocked Environmental Variables") that blocks testing and displays a completely different results while using the same steps. I'm providing the pushlog from the last confirmed working build to the first confirmed broken build. There are only 3 changesets listed, and 2 appear to directly deal with the camera.
Regression Window using b2g-inbound builds.
Last Confirmed Working Environmental Variables:
Device: Buri
BuildID: 20140214141848
Gaia: 4830eedd1bde5de11f6a4914914a811786855955
Gecko: d9c3937698f1
Version: 30.0a1
Base Image: V1.2-device.cfg
Blocked Environmental Variables:
Device: Buri
BuildID: 20140214144156
Gaia: 4830eedd1bde5de11f6a4914914a811786855955
Gecko: e93e96ed8a5a
Version: 30.0a1
Base Image: V1.2-device.cfg
First Confirmed Broken Environmental Variables:
Device: Buri
BuildID: 20140214151149
Gaia: 4743cc22af8e6e4473913982eb9ef148b3d11999
Gecko: 7be87737b566
Version: 30.0a1
Base Image: V1.2-device.cfg
Blocked and Last Working Gaia/First Broken Gecko: Issue is blocked from testing.
Gaia: 4830eedd1bde5de11f6a4914914a811786855955
Gecko: 7be87737b566
First Broken Gaia/Blocked Gecko: Issue DOES occur.
Gaia: 4743cc22af8e6e4473913982eb9ef148b3d11999
Gecko: e93e96ed8a5a
First Broken Gaia/Last Working Gecko: Issue Does NOT occur.
Gaia: 4743cc22af8e6e4473913982eb9ef148b3d11999
Gecko: d9c3937698f1
Gecko Pushlog: http://hg.mozilla.org/integration/b2g-inbound/pushloghtml?fromchange=d9c3937698f1&tochange=7be87737b566
Keywords: regressionwindow-wanted
Comment 15•11 years ago
|
||
Tim,
Can we get help from your team to look into this one please?
Thanks a lot!
Hema
Flags: needinfo?(timdream)
Comment 16•11 years ago
|
||
:snowmantw, I remembered you told me there was something quirky deviceorentation events when there are two camera apps last week, so this should be fixed in either in Gecko. Please write down a more detailed summary here and change the subject too.
Flags: needinfo?(timdream) → needinfo?(gweng)
Comment 17•11 years ago
|
||
As I said at Comment 9, this bug, at least its root cause, is *irrelevant* to LockScreen.
The same symptom can be reproduced in SMS app, which allow us to use mozActivity to launch the second camera while we already have one. In fact, I believe that we could even reproduce it in other ways, and the only necessary condition is to have a camera already, and then open another via mozActivity or other possible ways.
This is also what I discussed with Tim offline. According to these information and the discussion, I will change the title.
Tested with:
ZTE Open
Version 1.4.0
Build: 20140303160208
Platform version: 30.0a1
Today's bubble-tea (synced with master)
Flags: needinfo?(gweng)
Updated•11 years ago
|
Summary: [B2G][Camera]Using the camera app from the lockscreen with passcode lock enabled causes rotation to not work in camera app → [B2G][Camera] Rotation not work in camera app after user launched the second camera via mozActivity
Comment 18•11 years ago
|
||
Mike,
Could you take a shot at figuring out the fix for this?
Thanks
Hema
Assignee: nobody → mhabicher
Assignee | ||
Comment 19•11 years ago
|
||
I can confirm with the following:
- gecko: b2g-inbound:4cbe7b47acb1
- gaia: master:ca537fbba22c94c878905bbacf28096d0f63a2ac
...that after following the STR in comment 0, js/vendor/orientation.js::handleMotionEvent() does not get any more events after switching back to the non-lockscreen camera.
Assignee | ||
Comment 20•11 years ago
|
||
Though not mentioned in the documentation:
https://developer.mozilla.org/en-US/docs/Web/Reference/Events/devicemotion
...it looks like an app losing focus is sufficient to stop the arrival of 'devicemotion' events. Making sure that the Camera app removes this event listener on blur and re-adds it on focus fixes this problem.
Assignee | ||
Comment 21•11 years ago
|
||
Attachment #8391422 -
Flags: review?(jdarcangelo)
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Flags: needinfo?(dmarcos)
Comment 22•11 years ago
|
||
Comment on attachment 8391422 [details]
Link to PR to fix Camera app orientation
Pretty simple. Looks good to me!
Attachment #8391422 -
Flags: review?(jdarcangelo) → review+
Assignee | ||
Comment 23•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
status-b2g-v1.4:
--- → fixed
Target Milestone: --- → 1.4 S4 (28mar)
Updated•11 years ago
|
status-b2g-v2.0:
--- → unaffected
You need to log in
before you can comment on or make changes to this bug.
Description
•