Searched defs:attachment (Results 1 - 22 of 22) sorted by relevance

/packages/apps/UnifiedEmail/src/com/android/mail/compose/
H A DAttachmentComposeView.java34 * This view is used in the ComposeActivity to display an attachment along with its name/size
41 public AttachmentComposeView(Context c, Attachment attachment) { argument
43 mAttachment = attachment;
48 attachStr = attachment.toJSON().toString(2);
50 attachStr = attachment.toString();
52 LogUtils.d(LOG_TAG, "attachment view: %s", attachStr);
57 factory.inflate(R.layout.attachment, this);
H A DAttachmentsView.java96 * Add an attachment and update the ui accordingly.
97 * @param attachment
99 public void addAttachment(final Attachment attachment) { argument
104 mAttachments.add(attachment);
107 // If we have an attachment that should be shown in a tiled look,
109 if (AttachmentTile.isTiledAttachment(attachment)) {
111 mTileGrid.addComposeTileFromAttachment(attachment);
115 deleteAttachment(attachmentTile, attachment);
122 new AttachmentComposeView(getContext(), attachment);
127 deleteAttachment(attachmentView, attachment);
142 deleteAttachment(final View attachmentView, final Attachment attachment) argument
315 addAttachment(Account account, Attachment attachment) argument
[all...]
H A DComposeActivity.java1533 LogUtils.e(LOG_TAG, error, "Error adding attachment");
1544 * When an attachment is too large to be added to a message, show a toast.
1583 LogUtils.e(LOG_TAG, e, "Error adding attachment");
1604 LogUtils.e(LOG_TAG, e, "Error adding attachment");
1624 LogUtils.e(LOG_TAG, e, "Error adding attachment");
1678 * Add attachment and update the compose area appropriately.
1692 LogUtils.e(LOG_TAG, e, "Error adding attachment");
1700 public void addAttachmentAndUpdateView(Attachment attachment) { argument
1702 long size = mAttachmentsView.addAttachment(mAccount, attachment);
1708 LogUtils.e(LOG_TAG, e, "Error adding attachment");
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/browse/
H A DAttachmentProgressDialogFragment.java32 public static final String ATTACHMENT_KEY = "attachment";
39 static AttachmentProgressDialogFragment newInstance(Attachment attachment) { argument
42 // Supply the attachment as an argument.
44 args.putParcelable(ATTACHMENT_KEY, attachment);
89 // This needs to cancel the attachment
117 public boolean isShowingDialogForAttachment(Attachment attachment) { argument
119 && Objects.equal(attachment.getIdentifierUri(), mAttachment.getIdentifierUri());
H A DAttachmentActionHandler.java46 private static final String PROGRESS_FRAGMENT_TAG = "attachment-progress";
71 public void setAttachment(Attachment attachment) { argument
72 mAttachment = attachment;
97 * Start downloading the full size attachment set with
111 Attachment attachment, int destination, int rendition, int additionalPriority,
120 mCommandHandler.sendCommand(attachment.uri, params);
130 public void startRedownloadingAttachment(Attachment attachment) { argument
133 params.put(AttachmentColumns.DESTINATION, attachment.destination);
135 mCommandHandler.sendCommand(attachment.uri, params);
110 startDownloadingAttachment( Attachment attachment, int destination, int rendition, int additionalPriority, boolean delayDownload) argument
H A DMessageAttachmentBar.java54 * View for a single attachment in conversation view. Shows download status and allows launching
55 * intents to act on an attachment.
106 * Render or update an attachment's view. This happens immediately upon instantiation, and
110 public void render(Attachment attachment, Uri accountUri, boolean loaderResult) { argument
115 mAttachment = attachment;
121 mSaveClicked = !attachment.isDownloading() ? false : mSaveClicked;
123 LogUtils.d(LOG_TAG, "got attachment list row: name=%s state/dest=%d/%d dled=%d" +
124 " contentUri=%s MIME=%s flags=%d", attachment.getName(), attachment.state,
125 attachment
[all...]
H A DMessageAttachmentTile.java52 * View for a single attachment in conversation view. Shows download status and allows launching
53 * intents to act on an attachment.
82 * Render or update an attachment's view. This happens immediately upon instantiation, and
87 public void render(Attachment attachment, Uri attachmentsListUri, int index, argument
89 super.render(attachment, attachmentsListUri, index, attachmentPreviewCache, loaderResult);
205 // Download if there is network. This check prevents the attachment
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
H A DThumbnailLoadTask.java53 final Attachment attachment, final Attachment prevAttachment) {
56 if (attachment == null || width == 0 || height == 0
57 || !ImageUtils.isImageMimeType(attachment.getContentType())) {
62 final Uri thumbnailUri = attachment.thumbnailUri;
63 final Uri contentUri = attachment.contentUri;
51 setupThumbnailPreview( ThumbnailLoadTask task, final AttachmentBitmapHolder holder, final Attachment attachment, final Attachment prevAttachment) argument
H A DAttachmentTile.java43 * Base class for attachment tiles that handles the work of fetching and displaying the bitmaps for
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) { argument
70 return ImageUtils.isImageMimeType(attachment.getContentType());
100 * Render or update an attachment's view. This happens immediately upon instantiation, and
104 public void render(Attachment attachment, Uri attachmentsListUri, int index, argument
106 if (attachment
266 AttachmentPreview(Attachment attachment, Bitmap preview) argument
273 set(Attachment attachment, Bitmap preview) argument
274 get(Attachment attachment) argument
[all...]
H A DAttachmentTileGrid.java70 // Adding tiles to grid and filling in attachment information
72 for (Attachment attachment : list) {
73 addMessageTileFromAttachment(attachment, index++, loaderResult);
77 private void addMessageTileFromAttachment(Attachment attachment, int index, argument
89 attachmentTile.render(attachment, mAttachmentsListUri, index, this, loaderResult);
92 public ComposeAttachmentTile addComposeTileFromAttachment(Attachment attachment) { argument
97 attachmentTile.render(attachment, null, -1, this, false);
218 * Save the preview for an attachment
221 public void set(Attachment attachment, Bitmap preview) { argument
222 final String attachmentIdentifier = attachment
233 get(Attachment attachment) argument
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/utils/
H A DAttachmentUtils.java83 * Return a friendly localized file type for this attachment, or the empty string if
88 public static String getDisplayType(final Context context, final Attachment attachment) { argument
89 if ((attachment.flags & Attachment.FLAG_DUMMY_ATTACHMENT) != 0) {
90 // This is a dummy attachment, display blank for type.
97 final String contentType = attachment.getContentType();
104 String extension = Utils.getFileExtension(attachment.getName());
161 * Cache the file specified by the given attachment. This will attempt to use any
164 * @param attachment Attachment to be cached
167 * @return String file path for the cached attachment
169 // TODO(pwestbro): Once the attachment ha
172 cacheAttachmentUri(Context context, Attachment attachment, Bundle attachmentFds) argument
273 canDownloadAttachment(Context context, Attachment attachment) argument
[all...]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/internet/
H A DRfc822Output.java176 // Move to the first attachment; this must succeed because multipart is true
178 // If we've got one attachment and it's an ics "attachment", we want to send
213 * Write a single attachment and its payload
216 Attachment attachment) throws IOException, MessagingException {
218 attachment.mMimeType + ";\n name=\"" + attachment.mFileName + "\"");
222 if ((attachment.mFlags & Attachment.FLAG_ICS_ALTERNATIVE_PART) == 0) {
224 "attachment;"
225 + "\n filename=\"" + attachment
215 writeOneAttachment(Context context, Writer writer, OutputStream out, Attachment attachment) argument
[all...]
/packages/apps/Email/tests/src/com/android/email/mail/transport/
H A DSmtpSenderUnitTests.java134 * Test: Open and send a single message with an empty attachment (no file) (sunny day)
146 // Creates an attachment with a bogus file (so we get headers only)
147 Attachment attachment = setupSimpleAttachment(mProviderContext, message.mId);
148 attachment.save(mProviderContext);
154 expectSimpleAttachment(mockTransport, attachment);
192 * Prepare to send a simple attachment
195 Attachment attachment = new Attachment();
196 attachment.mFileName = "the file.jpg";
197 attachment.mMimeType = "image/jpg";
198 attachment
211 expectSimpleAttachment(MockTransport mockTransport, Attachment attachment) argument
[all...]
/packages/apps/Exchange/src/com/android/exchange/eas/
H A DEasLoadAttachment.java73 * @param attachmentId The local id of the attachment (i.e. its id in the database).
108 final EmailContent.Attachment attachment) {
110 mAttachment = attachment;
120 * Encoder for Exchange 2003 attachment names. They come from the server partially encoded,
126 // These four characters are commonly received in EAS 2.5 attachment names and are
133 * Finish encoding attachment names for Exchange 2003.
145 * Finish encoding attachment names for Exchange 2003.
152 LogUtils.e(LOG_TAG, "Could not load attachment %d", mAttachmentId);
172 // First callback to let the client know that we have started the attachment load.
180 // We had an error processing an attachment, le
107 ProgressCallback(final IEmailServiceCallback callback, final EmailContent.Attachment attachment) argument
255 finishLoadAttachment(final EmailContent.Attachment attachment, final File file) argument
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/photo/
H A DMailPhotoViewActivity.java147 final Attachment attachment = getCurrentAttachment();
149 if (attachment != null && mSaveItem != null && mShareItem != null) {
150 mSaveItem.setEnabled(!attachment.isDownloading()
151 && attachment.canSave() && !attachment.isSavedToExternal());
152 mShareItem.setEnabled(attachment.canShare());
153 mDownloadAgainItem.setEnabled(attachment.canSave() && attachment.isDownloading());
165 // If one attachment can be saved, enable save all
225 final Attachment attachment
266 updateProgressAndEmptyViews( final PhotoViewFragment fragment, final Attachment attachment) argument
324 saveAttachment(final Attachment attachment) argument
358 shareAttachment(final Attachment attachment) argument
[all...]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/
H A DAttachmentUtilities.java128 * The maximum size of an attachment we're willing to download (either View or Save)
130 * so we should probably factor that in. A 5MB attachment will generally be around
135 * The maximum size of an attachment we're willing to upload (measured as stored on disk).
137 * so we should probably factor that in. A 5MB attachment will generally be around
169 * Return the filename for a given attachment. This should be used by any code that is
180 * Return the directory for a given attachment. This should be used by any code that is
216 * @return A likely mime type for the attachment
267 * Resolve attachment id to content URI. Returns the resolved content URI (from the attachment
296 * In support of deleting a message, find all attachments and delete associated attachment
398 saveAttachment(Context context, InputStream in, Attachment attachment) argument
[all...]
H A DUtility.java735 public static boolean attachmentExists(Context context, Attachment attachment) { argument
736 if (attachment == null) {
738 } else if (attachment.mContentBytes != null) {
741 final String cachedFile = attachment.getCachedFileUri();
759 final String contentUri = attachment.getContentUri();
798 // If the attachment doesn't exist and isn't marked for download, we're in trouble
800 // we'll just delete the attachment and continue; this is far better than the
804 LogUtils.d(Logging.LOG_TAG, "Unloaded attachment isn't marked for download: " +
809 // the attachment has been loaded
818 // In this case, the attachment fil
[all...]
/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 mimetype.
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 DNotificationController.java388 * Show (or update) a notification that the given attachment could not be forwarded. This
394 public void showDownloadForwardFailedNotification(Attachment attachment) { argument
395 Message message = Message.restoreMessageWithId(mContext, attachment.mMessageKey);
401 attachment.mFileName,
/packages/apps/UnifiedEmail/src/com/android/mail/providers/
H A DEmlAttachmentProvider.java54 * of the regular attachment provider.
56 * One major difference is that all attachment info is stored in memory (with the
57 * exception of the attachment raw data which is stored in the cache). When
83 * Map that contains a mapping from an attachment list uri to a list of uris.
88 * Map that contains a mapping from an attachment uri to an {@link Attachment} object.
158 // add mapping from uri to attachment
161 // get list of attachment uris, creating if necessary
207 * Adds a row to the cursor for the attachment at the specific attachment {@link Uri}
208 * if the attachment'
232 addRow(MatrixCursor cursor, Attachment attachment) argument
[all...]
/packages/apps/Bluetooth/src/com/android/bluetooth/map/
H A DBluetoothMapAppParams.java99 private int attachment = INVALID_VALUE_PARAMETER; field in class:BluetoothMapAppParams
630 return attachment;
633 public void setAttachment(int attachment) throws IllegalArgumentException { argument
634 if (attachment < 0 || attachment > 0x0001)
636 this.attachment = attachment;
/packages/apps/Email/src/com/android/email/service/
H A DAttachmentDownloadService.java77 // Try to download an attachment in the background this many times before giving up
102 "com.android.email.AttachmentDownloadService.attachment";
114 // A map of attachment storage used per account
119 // A map of attachment ids to the number of failed attempts to download the attachment
189 private DownloadRequest(Context context, Attachment attachment) { argument
190 attachmentId = attachment.mId;
191 Message msg = Message.restoreMessageWithId(context, attachment.mMessageKey);
198 priority = getPriority(attachment);
224 * Two download requests are equals if their attachment i
[all...]

Completed in 5597 milliseconds