Skip to content

Conversation

@michaelsafyan
Copy link

This change makes the format used by insertImage() explicit, allowing code that requires this information to depend on it symbolically rather than by examining the source. A case where this is useful is when specifying the MIME type in Intent.setType() when passing the result of insertImage as an Intent extra and attempting to invoke an activity that handles most "image/*" MIME types but that does not have a registered intent filter for "vnd.android.cursor.dir/image". In such a scenario, code might have hard-coded "image/jpeg" as a string; after this change, it becomes possible to use the STORED_CONTENT_TYPE variable, which would make such code less fragile.

This change makes the format used by insertImage() explicit, allowing code that requires this information to depend on it symbolically rather than by examining the source. A case where this is useful is when specifying the MIME type in Intent.setType() when passing the result of insertImage as an Intent extra and attempting to invoke an activity that handles most "image/*" MIME types but that does not have a registered intent filter for "vnd.android.cursor.dir/image". In such a scenario, code might have hard-coded "image/jpeg" as a string; after this change, it becomes possible to use the STORED_CONTENT_TYPE variable, which would make such code less fragile.
@bcopeland
Copy link

I think you submitted this to the wrong upstream? I believe cozybit just forked this from elsewhere (although not in a way that it shows up as a fork in github).

@michaelsafyan
Copy link
Author

Oops. Thanks. You're right.

On Sun, Dec 14, 2014, 19:31 Bob Copeland notifications@github.com wrote:

I think you submitted this to the wrong upstream? I believe cozybit just
forked this from elsewhere (although not in a way that it shows up as a
fork in github).


Reply to this email directly or view it on GitHub
#5 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants