Merge change 5787 into donut

* changes:
  Fix http://code.google.com/p/android/issues/detail?id=3059
This commit is contained in:
Android (Google) Code Review
2009-06-30 10:57:18 -07:00

View File

@@ -344,7 +344,10 @@ public final class MediaStore
// Check if file exists with a FileInputStream
FileInputStream stream = new FileInputStream(imagePath);
try {
return insertImage(cr, BitmapFactory.decodeFile(imagePath), name, description);
Bitmap bm = BitmapFactory.decodeFile(imagePath);
String ret = insertImage(cr, bm, name, description);
bm.recycle();
return ret;
} finally {
try {
stream.close();