Closed Bug 897199 Opened 11 years ago Closed 10 years ago

Camera should not request geolocation if no SD card was detected

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wenzel, Assigned: wilsonpage)

Details

Attachments

(2 files)

STR:
- On a phone without SD card, open the camera app. Receive an error message to that effect.
- note that it still opens a request to perform geolocation even though you won't be able to take any pictures anyway.
Expected:
- If there is a fatal error that'll keep you from taking pictures, don't ask for geolocation.

(In fact, this way you won't be covering up the error message)
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
I do not know if this is the way to fix this, but seems to work on a Geeksphone Keon both with and without SD card inserted.
Attachment #8357150 - Flags: review?(dale)
Comment on attachment 8357150 [details] [review]
Do not request Position while no storage is available.

Redirecting review, however it looks good to me
Attachment #8357150 - Flags: review?(dflanagan)
Attachment #8357150 - Flags: review?(dale)
Attachment #8357150 - Flags: feedback+
Comment on attachment 8357150 [details] [review]
Do not request Position while no storage is available.

A complete refactoring of the camera app has just landed, so this patch will need to be re-done from scratch.

The new camera app is much more modular, so you won't be able to put geolocation code in the storage query.  You'll have to figure out a more modular way to defer geolocation initialization until the storage query returns.

Setting needinfo for Wilson in case he has suggestions on the best way to achieve this.
Attachment #8357150 - Flags: review?(dflanagan) → review-
Flags: needinfo?(wilsonpage)
There is a quick fix for this and a more future friendly fix.

I propose we use this bug as an opportunity to separate the storage layer from the camera hardware. When the storage module is successfully configured it can emit an event. The geolocation module will then only begin watching location after this event has fired.

By splitting the storage from the hardware, we get increased separation of concerns as well as an opportunity to support different forms of storage (indexedDB) and different forms of hardware (getUserMedia), when the app is run inside different environments.

Either way, I'm happy to take this ticket :)
Assignee: nobody → wilsonpage
Status: NEW → ASSIGNED
Flags: needinfo?(wilsonpage)
Ah ok, I was looking at fixing this the proper way now, but I got stuck since nothing is in scope anymore for the debugger (when using the device with the app-manager).

Can you give me any pointers on how you would debug this?
Attached file master patch
Attachment #8361198 - Flags: review?(dmarcos)
Attachment #8361198 - Flags: review?(dmarcos) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: