diff options
-rw-r--r-- | src/com/android/mail/browse/AttachmentActionHandler.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/mail/browse/AttachmentActionHandler.java b/src/com/android/mail/browse/AttachmentActionHandler.java index fda1f85f9..639e37c72 100644 --- a/src/com/android/mail/browse/AttachmentActionHandler.java +++ b/src/com/android/mail/browse/AttachmentActionHandler.java @@ -290,7 +290,7 @@ public class AttachmentActionHandler { Uri contentUri = attachment.contentUri; InputStream in = mContext.getContentResolver().openInputStream(contentUri); OutputStream out = new FileOutputStream(file); - IOUtils.copy(in, out); + int size = IOUtils.copy(in, out); out.flush(); out.close(); in.close(); @@ -301,7 +301,7 @@ public class AttachmentActionHandler { (DownloadManager) mContext.getSystemService(Context.DOWNLOAD_SERVICE); dm.addCompletedDownload(attachment.getName(), attachment.getName(), false /* do not use media scanner */, - attachment.getContentType(), absolutePath, attachment.downloadedSize, + attachment.getContentType(), absolutePath, size, true /* show notification */); return file; |