mozilla-b2g/gaia — pull request #6014 by asutherland (2012-10-26 07:27:52+00:00)
Title: Bug 799827, Bug 798719 implement sending image attachments and downloading image attachments

r? @mozsquib

This depends on the changes to gaia-email-opt.js from a build of
https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/68

Note that although this patch currently names files with stupid unnamed names, the intent is to land https://github.com/mozilla-b2g/gaia/pull/6012 which exposes the filenames, and then we can just use that.

@davidflanagan In this patch, we use gallery's "open" activity. I modify the activity definition to work with png files here, but I am concerned I may be shortcutting things a bit too much currently. Specifically, the idea is to reuse gallery's pinch/zoom/etc. functionality to look at images. However, it seems like the "open" activity is very clearly assuming it is for the camera app since it exposes a trash icon that only does trashy things in the camera app when it checks the return value. I expect I should file a bug on gallery so we can get project management to approve slightly parameterizing the 'open' functionality and/or decide on another way to abuse gallery so that e-mail doesn't need to duplicate the code?