Searched refs:attachment (Results 1 - 14 of 14) sorted by relevance

/packages/apps/Email/tests/src/com/android/email/mail/transport/
H A DSmtpSenderUnitTests.java132 * Test: Open and send a single message with an empty attachment (no file) (sunny day)
144 // Creates an attachment with a bogus file (so we get headers only)
145 Attachment attachment = setupSimpleAttachment(mProviderContext, message.mId);
146 attachment.save(mProviderContext);
152 expectSimpleAttachment(mockTransport, attachment);
190 * Prepare to send a simple attachment
193 Attachment attachment = new Attachment();
194 attachment.mFileName = "the file.jpg";
195 attachment.mMimeType = "image/jpg";
196 attachment
209 expectSimpleAttachment(MockTransport mockTransport, Attachment attachment) argument
[all...]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/internet/
H A DRfc822Output.java236 // Move to the first attachment; this must succeed because multipart is true
239 // If we've got one attachment and it's an ics "attachment", we want to send
261 Attachment attachment =
263 writeOneAttachment(context, writer, stream, attachment);
279 * Write a single attachment and its payload
282 Attachment attachment) throws IOException, MessagingException {
284 attachment.mMimeType + ";\n name=\"" + attachment.mFileName + "\"");
288 if ((attachment
281 writeOneAttachment(Context context, Writer writer, OutputStream out, Attachment attachment) argument
[all...]
H A DMimeUtility.java415 // An attachment filename can be defined in either the Content-Disposition header
422 boolean attachmentDisposition = "attachment".equalsIgnoreCase(dispositionType);
427 // A guess that this part is intended to be an attachment
428 boolean attachment = attachmentDisposition
435 boolean attachmentOrInline = attachment || inline;
457 // Finally, if it's an attachment or an inline we will include it as an attachment.
/packages/apps/Email/src/com/android/email/
H A DAttachmentInfo.java37 * Encapsulates commonly used attachment information related to suitability for viewing and saving,
38 * based on the attachment's filename and mime type.
58 /** No receiving intent to handle attachment type */
75 /** Whether or not this attachment can be viewed */
77 /** Whether or not this attachment can be saved */
79 /** Whether or not this attachment can be installed [only true for APKs] */
81 /** Reason(s) why this attachment is denied from being viewed */
84 public AttachmentInfo(Context context, Attachment attachment) { argument
85 this(context, attachment.mId, attachment
[all...]
H A DMessagingController.java300 // Drop all attachment files related to this mailbox
923 // Delete associated data (attachment files)
1045 Log.e(Logging.LOG_TAG, "Error while storing attachment." + ioe.toString());
1907 * Attempts to load the attachment specified by id from the given account and message.
1916 //1. Check if the attachment is already here and return early in that case
1917 Attachment attachment =
1919 if (attachment == null) {
1921 new MessagingException("The attachment is null"),
1925 if (Utility.attachmentExists(mContext, attachment)) {
1940 "Account, mailbox, message or attachment ar
[all...]
H A DNotificationController.java498 * Show (or update) a notification that the given attachment could not be forwarded. This
504 public void showDownloadForwardFailedNotification(Attachment attachment) { argument
505 final Account account = Account.restoreAccountWithId(mContext, attachment.mAccountKey);
510 attachment.mFileName,
/packages/apps/Email/tests/src/com/android/emailcommon/utility/
H A DUtilityMediumTests.java97 // We return false with null attachment
104 Attachment attachment = ProviderTestUtils.setupAttachment(message.mId, "filename.ext",
106 attachment.mContentBytes = null;
108 assertFalse(Utility.attachmentExists(mMockContext, attachment));
110 attachment.mContentBytes = new byte[0];
112 assertTrue(Utility.attachmentExists(mMockContext, attachment));
114 attachment.mContentBytes = null;
122 assertFalse(Utility.attachmentExists(mMockContext, attachment));
130 attachment.mContentUri = "file://" + file.getAbsolutePath();
132 assertTrue(Utility.attachmentExists(mMockContext, attachment));
[all...]
/packages/apps/Email/src/com/android/email/activity/
H A DMessageViewFragmentBase.java166 /** Flag for {@link #mTabFlags}: Message has attachment(s) */
365 // the attachment tab as system settings may have been updated that affect which
443 // an attachment or invite before loading it). We just remember the tab here.
751 * Abort early if there's no place to save the attachment. We don't want to spend
774 Attachment attachment = Attachment.restoreAttachmentWithId(mContext, info.mId);
775 Uri attachmentUri = AttachmentUtilities.getAttachmentUri(mAccountId, attachment.mId);
781 File file = Utility.createUniqueFile(downloads, attachment.mFileName);
794 // user clicks on the item in the Downloads app. So, we run the attachment through
847 private void onInfoAttachment(final MessageViewAttachmentInfo attachment) { argument
849 AttachmentInfoDialog.newInstance(getActivity(), attachment
853 onLoadAttachment(final MessageViewAttachmentInfo attachment) argument
885 onCancelAttachment(MessageViewAttachmentInfo attachment) argument
1236 getPreviewIcon(Context context, AttachmentInfo attachment) argument
1269 MessageViewAttachmentInfo(Context context, Attachment attachment, ProgressBar progressView) argument
1481 addAttachment(Attachment attachment) argument
[all...]
H A DMessageCompose.java107 * N: add attachment
846 for (Attachment attachment: attachments) {
847 addAttachment(attachment);
922 for (Attachment attachment : attachments) {
924 attachment.mFlags |= Attachment.FLAG_SMART_FORWARD;
926 mSourceAttachments.add(attachment);
1097 void onAttachmentLoaded(Attachment[] attachment); argument
1226 * @param hasAttachments true if it has one or more attachment.
1332 // For any unloaded attachment, set the flag saying we need it loaded
1334 for (Attachment attachment
1593 addAttachment(Attachment attachment) argument
1715 deleteAttachment(List<Attachment> attachments, Attachment attachment) argument
[all...]
/packages/apps/Email/src/com/android/email/service/
H A DAttachmentDownloadService.java68 // Try to download an attachment in the background this many times before giving up
93 "com.android.email.AttachmentDownloadService.attachment";
105 // A map of attachment storage used per account
110 // A map of attachment ids to the number of failed attempts to download the attachment
177 private DownloadRequest(Context context, Attachment attachment) { argument
178 attachmentId = attachment.mId;
179 Message msg = Message.restoreMessageWithId(context, attachment.mMessageKey);
186 priority = getPriority(attachment);
196 * Two download requests are equals if their attachment i
[all...]
/packages/apps/Mms/src/com/android/mms/ui/
H A DConversationListItem.java86 mAttachmentView = findViewById(R.id.attachment);
190 // When there's an error icon, the attachment icon is left of the error icon.
191 // When there is not an error icon, the attachment icon is left of the date text.
219 subjectLayout.addRule(RelativeLayout.LEFT_OF, hasAttachment ? R.id.attachment :
/packages/apps/Gallery2/tests/src/com/android/gallery3d/ui/
H A DGLStub.java1313 int attachment,
1320 int attachment,
1354 int attachment,
1362 int attachment,
1311 glFramebufferRenderbufferOES( int target, int attachment, int renderbuffertarget, int renderbuffer ) argument
1318 glFramebufferTexture2DOES( int target, int attachment, int textarget, int texture, int level ) argument
1352 glGetFramebufferAttachmentParameterivOES( int target, int attachment, int pname, int[] params, int offset ) argument
1360 glGetFramebufferAttachmentParameterivOES( int target, int attachment, int pname, java.nio.IntBuffer params ) argument
/packages/apps/Email/tests/src/com/android/email/
H A DLegacyConversionsTests.java230 Attachment attachment = Attachment.getContent(c, Attachment.class);
231 if ("100".equals(attachment.mLocation)) {
232 checkAttachment("attachment1Part", attachments.get(0), attachment,
234 } else if ("101".equals(attachment.mLocation)) {
235 checkAttachment("attachment2Part", attachments.get(1), attachment,
238 fail("Unexpected attachment with location " + attachment.mLocation);
247 * Test that only "attachment" or "inline" attachments are captured and added.
260 // 1. Standard attachment
265 "attachment;\
[all...]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/
H A DUtility.java744 public static boolean attachmentExists(Context context, Attachment attachment) { argument
745 if (attachment == null) {
747 } else if (attachment.mContentBytes != null) {
749 } else if (TextUtils.isEmpty(attachment.mContentUri)) {
753 Uri fileUri = Uri.parse(attachment.mContentUri);
785 // If the attachment doesn't exist and isn't marked for download, we're in trouble
787 // we'll just delete the attachment and continue; this is far better than the
791 Log.d(Logging.LOG_TAG, "Unloaded attachment isn't marked for download: " +
795 // In this case, the attachment file is gone from the cache; let's clear the

Completed in 261 milliseconds