Closed
Bug 974730
Opened 12 years ago
Closed 11 years ago
[Camera] Camera Library has to listen for the onPreviewStateChange event
Categories
(Firefox OS Graveyard :: Gaia::Camera, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dmarcos, Assigned: dmarcos, NeedInfo)
Details
Attachments
(4 files)
We have to listen for the onPreviewStateChange event of the gecko camera API and disable the UI elements that trigger camera reconfigurations. We're not allowed to change the state of the camera if the preview is not ready. There's parallel development to improve the robustness of the API and this might no be necessary in the future.
Assignee | ||
Updated•12 years ago
|
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #8378728 -
Flags: review?(wilsonpage)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → dmarcos
Comment 2•12 years ago
|
||
Comment on attachment 8378728 [details] [review]
Pull Request
Patch looks good. Could you clarify exactly what `previewStateChange` is?
Attachment #8378728 -
Flags: review?(wilsonpage) → review+
Updated•12 years ago
|
Flags: needinfo?(dmarcos)
Comment 3•12 years ago
|
||
Without this patch, I can crash the app on my nexus 4 by tapping repeatedly and quickly on the front/rear camera toggle button.
I would expect this patch to disable the button and prevent that crash. But it does not prevent it, so I think this needs further work and I have not landed it.
Investigating further, the problem is that bug 972804 changed hud.css to use .hud_btn instead of just plain a tags, but it missed the disabled buttons case at line 63.
This patch fixes a crash and really needs to land to master. Please go ahead and land it, Diego, after you change this line in hud.css:
.hud[buttons-enabled=false] a {
In my testing, changing that line to:
.hud[buttons-enabled=false] .hud_btn {
makes the patch work.
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(dmarcos)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8385233 -
Flags: review?(dflanagan)
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8385234 -
Flags: review?(dflanagan)
Assignee | ||
Comment 6•11 years ago
|
||
I let David decide if we land this on master or camera new features
Comment 7•11 years ago
|
||
Attachment #8385797 -
Flags: review?(wilsonpage)
Assignee | ||
Comment 8•11 years ago
|
||
Is this PR attached to the proper bug?
Flags: needinfo?(singhashish1887)
Updated•11 years ago
|
Attachment #8385233 -
Flags: review?(dflanagan) → review+
Updated•11 years ago
|
Attachment #8385234 -
Flags: review?(dflanagan) → review+
Comment 9•11 years ago
|
||
Diego: r+ to land your patches on master and camera-new-features. (I'd already given r+ for it in comment #3.) This fixes a crash on master, so we need to land it there.
Assignee | ||
Comment 10•11 years ago
|
||
Landed in master:
https://github.com/mozilla-b2g/gaia/commit/c68dfe5bf0ac51c71047c4470000cd760f74e349
Flags: needinfo?(singhashish1887)
Assignee | ||
Comment 11•11 years ago
|
||
Can you add those tests in a separate bug?
Flags: needinfo?(singhashish1887)
Comment 12•11 years ago
|
||
Comment on attachment 8385797 [details] [review]
Pull Request (camera-dev) UT Test
r- due to:
1. Introducing global mock files loaded with requireApp API. Which none of the other test suites use.
2. Your branch hasn't been rabased on top of dmarco/camera-dev-rebased for a while. Meaning it's out of date, and will not land cleanly.
Attachment #8385797 -
Flags: review?(wilsonpage) → review-
Assignee | ||
Comment 13•11 years ago
|
||
I'm confused. Why are these tests attached to this bug?
https://bugzilla.mozilla.org/attachment.cgi?id=8385797
Should we move this to a different bug?
Assignee | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•