am b618b2ef: am f0dbf00d: Merge "Handle OutOfMemoryError when decoding images in ThumbnailUtils"

* commit 'b618b2ef8722964730d09a86a06a85ca34df6de4':
  Handle OutOfMemoryError when decoding images in ThumbnailUtils
This commit is contained in:
Brad Fitzpatrick
2011-03-30 08:20:58 -07:00
committed by Android Git Automerger

View File

@@ -83,7 +83,7 @@ public class ThumbnailUtils {
* *
* @param filePath the path of image file * @param filePath the path of image file
* @param kind could be MINI_KIND or MICRO_KIND * @param kind could be MINI_KIND or MICRO_KIND
* @return Bitmap * @return Bitmap, or null on failures
* *
* @hide This method is only used by media framework and media provider internally. * @hide This method is only used by media framework and media provider internally.
*/ */
@@ -123,6 +123,8 @@ public class ThumbnailUtils {
bitmap = BitmapFactory.decodeFileDescriptor(fd, null, options); bitmap = BitmapFactory.decodeFileDescriptor(fd, null, options);
} catch (IOException ex) { } catch (IOException ex) {
Log.e(TAG, "", ex); Log.e(TAG, "", ex);
} catch (OutOfMemoryError oom) {
Log.e(TAG, "Unable to decode file " + filePath + ". OutOfMemoryError.", oom);
} }
} }