summaryrefslogtreecommitdiff
path: root/src/com/android/mail/ui/ThumbnailLoadTask.java
Commit message (Collapse)AuthorAgeFilesLines
* Use attachment cache on layout passesJin Cao2014-09-151-2/+11
| | | | | | | | | Avoid trying to load the preview bitmap if the attachment is already cached. b/17365401 Change-Id: Ie3a24f25749cca8da402894ac57dd1181a510b6a
* Fix typo in loading thumbnailJin Cao2014-09-151-1/+1
| | | | | | | | | | | | | Currently there is a typo in thumbnail loader where we always try to load the thumbnail regardless if we already loaded it or not. It's not the cause of the loop described in the bug but it's still incorrect. b/17365401 Change-Id: If6587f001d0e8dec81a71cf0e2ab6d298c187fbf
* Stop showing attachment title if image exists.Andrew Sapperstein2013-11-251-8/+2
| | | | | | | | | | | | Previously, we never explicitly hid the title and subtitle of attachment tiles. Now we show and hide the two views depending upon whether we're setting a real image or a the default image. Additionally eliminated the thumbnailloadtask that was never set or used. Change-Id: Ib2df5ea75cce569d9a4bb1bb1991f0ff9c3d3989
* Change the logging for errors loading attachmentMartin Hibdon2013-10-311-2/+4
| | | | | | | | | | b/11436795 It's not really an error condition to get a fileNotFound trying to load an attachment, it's normal if the attachment has not yet been downloaded. We don't need to spam the log with stack traces when this happens. Change-Id: I2e177d639d4eec69b72ee8692827d22675758768
* Respect orientation of attachment previews.Mark Wei2013-08-191-25/+1
| | | | | | | Previews with orientation will not be eligible for pooling. Bug: 10036191 Change-Id: Id7d625dde612742e4b12cc650c119f5c308456a3
* Improve error logging for loading thumbnails.Yu Ping Hu2013-03-281-2/+2
| | | | Change-Id: I5daaef6ee16e9a7b12f6fa71c473075b4170d341
* Set MIME type correctly on drafts when content provider does not provide it.Mark Wei2013-02-211-1/+1
| | | | | Bug: 8235172 Change-Id: I7bbccbecb7d038f3add4503be0dcf460a4864b2e
* Use getIdentifierUri() when comparing Attachment uris.Mark Wei2013-02-121-2/+2
| | | | | Bug: 7426699 Change-Id: I83514b4b01e311add414d326d0130a22eafbf19f
* Load image attachments from live conversations.Mark Wei2013-01-161-10/+5
| | | | | | | | | | | | | | MessageAttachmentTile automatically downloads image attachment thumbnails when missing. PhotoViewFragment first loads thumbnail, then loads the full image. Shows and hides the progressbar correctly. Added ability for UiProvider to specify which rendition of an attachment to download. Bug: 7987412 Change-Id: Ief7f4c9a4a354d27045f6415a32211484a8527c6
* Refactor Attachment code. Combined AttachmentStatusLoader.Result andMark Wei2013-01-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | | Gmail.Attachment into GmailAttachment. Renamed UIAttachment to Attachment, which still follows the UIProvider contract. GmailAttachment extends Attachment, and contains Gmail provider specific data. The DownloadListener in AttachmentStatusLoader will modify the cached GmailAttachments directly, where previously we would create new Results to give to the ConversationState. Cancelling an Attachment download will cancel both cache and external db entries. Attachment download dialog will close only if state is SAVED or FAILED. This prevents a NOT_SAVED state update from closing the dialog prematurely. Simplify AttachmentRequest. Simplify AttachmentStatusLoader to a listener. Bug: 7538447 Bug: 7538152 Change-Id: If6362473697e6735f1858619c7af83238d75469e
* Decrease the log verbosityPaul Westbrook2012-10-071-2/+2
| | | | | | | | If the file hasn't finished download, this was logging too much. This was making it hard to find more important logs Change-Id: I1bede53144d335b3b1dabf5534f7993f1af507d3
* Make small previews larger.Mark Wei2012-10-051-1/+1
| | | | | Bug: 7249020 Change-Id: Ieebe4afb00ecc9a40050dc5c41299b003b1f74c3
* Fix attachment previews from letterboxingMark Wei2012-09-281-24/+51
| | | | | | | | | * Fix scaling regression caused by BitmapFactory.decodeByteArray() * Smarter handling of different preview sizes. There are now 3 classes of preview images: large, long/skinny, and small. Bug: 7148589 Change-Id: Ie232cc00cd5a8adeed3309aa4615b28de2c37b1f
* Detect photo orientationPaul Westbrook2012-09-251-12/+46
| | | | | Bug: 7087307 Change-Id: I270fea67eac71864c62a0f6d600262681394f99f
* Attachment tile images are original size if smaller than bounding box.Mark Wei2012-08-281-0/+2
| | | | | | | | | | If one or less dimensions are within the bounding box, the preview is centered and cropped. If both dimensions are outside the bounding box, CENTER_CROP scaling is applied. Bug: 7055864 Change-Id: Id6155ab68cf0210d7f7c4ce843cbe72a585c5c4e
* Prevent NPE when specifying null urisPaul Westbrook2012-08-151-0/+5
| | | | | | | | | When an email message is deleted, it the EmailProvider returns null uris for the attachments. The ThumbnailLoadTask shouldn't crash in this case Bug: 6994143 Change-Id: Ib8f37026657c9cb05b9e283c02f37eff1ee6367b
* Image attachments open photo viewer immediately.Andrew Sapperstein2012-07-231-7/+18
| | | | | | | | | | Instead of downloading the first image and waiting for that operation to complete before entering the photo viewer, we now kick off the downloads for all photos that are not currently on device. The photo viewer shows download progress and also shows the photos once the download has completed. Change-Id: Ib9561b45020bbab1ffbcec9e88aab9604036fd5a
* Improved reliability for attaching photo previews.Andrew Sapperstein2012-07-171-4/+13
| | | | | | | | | | | | | | | | | | | | Previously, we were doing no scaling of the previews (to be more clear, we were, but then it was removed). As a result, when you attached large images, we occasionally, Now, we have restored the scaling of the images. However, That created a possible divide-by-zero error if we were launching the thumbnail loading before we had performed an initial layout and measure pass (because we had no width or height values for our view). To eliminate this possible error, we now perform a check for this case and don't attempt the photo load if we would have an error. Additionally, we have added a separate call to load the photo inside onLayout when we know that the attachment tile has a width and height. Change-Id: I3650f3d240e79242bcf30170b44eb6b3c1fd0c87
* Changes to support different Log tagsPaul Westbrook2012-06-251-1/+2
| | | | Change-Id: I7121fbf7132444fc0f5c0c130373e3f2d1a3cf7a
* Collapsing attachments in compose now works.Andrew Sapperstein2012-06-201-0/+132
When the draft has attachments, if the focus on any of the text fields changes, the attachment area collapses into a smaller area. Tapping that area causes the attachments to expand into the full view with the previews. Some refactoring was necessary to enable reuse of the thumbnail loading for the small preview icon. Change-Id: Iaefb71736a2359b9090b2fe736ad2f33a9838ed7