Lines Matching refs:Attachment
36 import com.android.mail.providers.Attachment;
42 * Base class for attachment tiles that handles the work of fetching and displaying the bitmaps for
46 protected Attachment mAttachment;
65 * Returns true if the attachment should be rendered as a tile. with a large image preview.
66 * @param attachment the attachment to render
67 * @return true if the attachment should be rendered as a tile
69 public static boolean isTiledAttachment(final Attachment attachment) {
70 return ImageUtils.isImageMimeType(attachment.getContentType());
100 public Attachment getAttachment() {
105 * Render or update an attachment's view. This happens immediately upon instantiation, and
109 protected void render(Attachment attachment, AttachmentPreviewCache attachmentPreviewCache) {
110 if (attachment == null) {
115 final Attachment prevAttachment = mAttachment;
116 mAttachment = attachment;
119 LogUtils.d(LOG_TAG, "got attachment list row: name=%s state/dest=%d/%d dled=%d" +
120 " contentUri=%s MIME=%s flags=%d", attachment.getName(), attachment.state,
121 attachment.destination, attachment.downloadedSize, attachment.contentUri,
122 attachment.getContentType(), attachment.flags);
124 if ((attachment.flags & Attachment.FLAG_DUMMY_ATTACHMENT) != 0) {
128 || !TextUtils.equals(attachment.getName(), prevAttachment.getName())) {
129 mTitle.setText(attachment.getName());
132 if (prevAttachment == null || attachment.size != prevAttachment.size) {
134 attachment.size);
135 mDisplayType = AttachmentUtils.getDisplayType(getContext(), attachment);
139 ThumbnailLoadTask.setupThumbnailPreview(mAttachmentPreviewCache, this, attachment,
277 public AttachmentPreview(Attachment attachment, Bitmap preview) {
278 this.attachmentIdentifier = attachment.getIdentifierUri().toString();
284 void set(Attachment attachment, Bitmap preview);
285 Bitmap get(Attachment attachment);