Closed Bug 812973 Opened 12 years ago Closed 12 years ago

[camera] activities must be initiated from an event handler

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-basecamp:+)

VERIFIED FIXED
blocking-basecamp +

People

(Reporter: djf, Assigned: daleharvey)

References

Details

Attachments

(1 file)

A recent change to the security model for activities only allows them to be launched in response to user input. (See https://mxr.mozilla.org/mozilla-central/source/dom/activities/src/Activity.cpp#59)

This seems to mean that you have to call MozActivity() from a click handler or similar. But Camera (and other media apps) use device storage and often the event handler makes a device storage request and then launches the activity from the device storage event hander.  But that isn't user input and the the activity's onerror handler is called with a NotUserInput error.

For camera, the filmstrip is short and I think it could just keep track of the 4 or 5 blobs so it can launch the activity directly without the device storage (or mediadb) call.

It appears to me that the completely breaks the camera filmstrip and will have to be blocking, since I doubt we can get the security people to revert their change.
blocking-basecamp: --- → ?
Cheers, good catch, will fix this asap
Assignee: nobody → dale
Attachment #683184 - Flags: review?(dflanagan)
Comment on attachment 683184 [details]
Remove async getFile call before launching activity

I've noted some nits on github but once you fix those, I think it is good to go.
Attachment #683184 - Flags: review?(dflanagan) → review+
fixed in https://github.com/mozilla-b2g/gaia/commit/4a9938435c22aa18dd13082f5642bc09f2bf5895
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Verified as fixed in build 20130104070203 on Unagi.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: