evernote/evernote-sdk-android — pull request #12 by juandg (2012-11-26 21:04:57+00:00)
Title: Fixed issue with MediaStore.Images.Media.getBitmap(...) where it could cause an Out of Memory crash.

While trying out the sample Android app I got and Out of Memory crash when loading a panoramic picture on a Samsung Galaxy S3. I was able to reproduce this behavior a few times and collected some logs:

https://www.dropbox.com/s/vdhv5tsqfk16inr/log.txt
https://www.dropbox.com/s/ajdb0xb442jzrx5/log2.txt

I fixed the issue by removing the call to MediaStore.Images.Media.getBitmap(...) which attempts to decode the whole bitmap and replaced it with some code to decode the Bitmap's bounds first, then calculate and appropriate sample size according to the screen dimensions and finally proceeds to decode a subsampled version of the bitmap that is just appropriate for the particular screen size but requires less memory.