OSDN Git Service

Handle OutOfMemoryError when decoding images in ThumbnailUtils
authorChrister Fletcher <christer.fletcher@sonyericsson.com>
Mon, 21 Mar 2011 14:56:27 +0000 (15:56 +0100)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 5 Aug 2011 08:10:07 +0000 (16:10 +0800)
commit5968156a492a3fc740039593e410196a6e7a97f9
treea9ebf722e02e4424fb4ef6c1ef5b366a48adcc94
parent23a723f50a2743ad883a8eb5ddfeaa21666deead
Handle OutOfMemoryError when decoding images in ThumbnailUtils

Added handling of OutOfMemoryError handling to createImageThumbnail
method in ThumbnailUtils.java. During mediascanner run it would run
out of memory when trying to decode very large images. Now it handles
this error and returns null which is handled by the media scanner.

Change-Id: Ie68722dfa1cedd3c0847bf483baa40c4827ad5a8
media/java/android/media/ThumbnailUtils.java