Home | History | Annotate | Download | only in activity

Lines Matching refs:Attachment

31 import com.android.email.provider.EmailContent.Attachment;
665 mLoadAttachmentsTask = new AsyncTask<Long, Void, Attachment[]>() {
667 protected Attachment[] doInBackground(Long... messageIds) {
668 return Attachment.restoreAttachmentsWithMessageId(MessageCompose.this,
672 protected void onPostExecute(Attachment[] attachments) {
676 for (Attachment attachment : attachments) {
677 addAttachment(attachment);
836 private Attachment[] getAttachmentsFromUI() {
838 Attachment[] attachments = new Attachment[count];
840 attachments[i] = (Attachment) mAttachments.getChildAt(i).getTag();
859 final Attachment[] attachments = getAttachmentsFromUI();
874 final Attachment[] attachments = getAttachmentsFromUI();
907 for (Attachment attachment : attachments) {
908 if (!attachment.isSaved()) {
909 // this attachment is new so save it to DB.
910 attachment.mMessageKey = mDraft.mId;
911 attachment.save(MessageCompose.this);
1010 private Attachment loadAttachmentInfo(Uri uri) {
1035 Attachment attachment = new Attachment();
1036 attachment.mFileName = name;
1037 attachment.mContentUri = uri.toString();
1038 attachment.mSize = size;
1039 attachment.mMimeType = contentType;
1040 return attachment;
1043 private void addAttachment(Attachment attachment) {
1044 // Before attaching the attachment, make sure it meets any other pre-attach criteria
1045 if (attachment.mSize > Email.MAX_ATTACHMENT_UPLOAD_SIZE) {
1055 nameView.setText(attachment.mFileName);
1058 view.setTag(attachment);
1108 Attachment attachment = (Attachment) attachmentView.getTag();
1110 if (attachment.isSaved()) {
1120 }.execute(attachment.mId);
1265 // Next, convert EXTRA_STREAM into an attachment
1285 Attachment attachment = loadAttachmentInfo(uri);
1286 if (MimeUtility.mimeTypeMatches(attachment.mMimeType,
1288 addAttachment(attachment);