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

12

/packages/apps/UnifiedEmail/src/com/android/mail/compose/
H A DAttachmentsView.java94 * Adds an attachment and updates the ui accordingly.
96 private void addAttachment(final Attachment attachment) { argument
97 mAttachments.add(attachment);
99 // If the attachment is inline do not display this attachment.
100 if (attachment.isInlineAttachment()) {
110 // If we have an attachment that should be shown in a tiled look,
112 if (AttachmentTile.isTiledAttachment(attachment)) {
114 mTileGrid.addComposeTileFromAttachment(attachment);
118 deleteAttachment(attachmentTile, attachment);
145 deleteAttachment(final View attachmentView, final Attachment attachment) argument
306 addAttachment(Account account, Attachment attachment) argument
[all...]
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 DComposeAttachmentTile.java33 public void render(Attachment attachment, AttachmentPreviewCache attachmentPreviewCache) { argument
35 super.render(attachment, attachmentPreviewCache);
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
H A DAttachmentTile.java42 * 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());
105 * Render or update an attachment's view. This happens immediately upon instantiation, and
109 protected void render(Attachment attachment, AttachmentPreviewCache attachmentPreviewCache) { argument
110 if (attachment
276 AttachmentPreview(Attachment attachment, Bitmap preview) argument
283 set(Attachment attachment, Bitmap preview) argument
284 get(Attachment attachment) argument
[all...]
H A DAttachmentTileGrid.java79 // Adding tiles to grid and filling in attachment information
81 for (Attachment attachment : list) {
82 addMessageTileFromAttachment(attachment, index++, loaderResult);
86 private void addMessageTileFromAttachment(Attachment attachment, int index, argument
99 attachmentTile.render(attachment, index, this, loaderResult);
102 public ComposeAttachmentTile addComposeTileFromAttachment(Attachment attachment) { argument
107 attachmentTile.render(attachment, this);
250 * Save the preview for an attachment
253 public void set(Attachment attachment, Bitmap preview) { argument
254 final String attachmentIdentifier = attachment
265 get(Attachment attachment) argument
[all...]
H A DThumbnailLoadTask.java52 final Attachment attachment, final Attachment prevAttachment) {
55 if (attachment == null || width == 0 || height == 0
56 || !ImageUtils.isImageMimeType(attachment.getContentType())) {
61 final Uri thumbnailUri = attachment.thumbnailUri;
62 final Uri contentUri = attachment.contentUri;
51 setupThumbnailPreview(final AttachmentBitmapHolder holder, final Attachment attachment, final Attachment prevAttachment) argument
/packages/apps/UnifiedEmail/src/com/android/mail/photo/
H A DMailPhotoViewController.java170 final Attachment attachment = getCurrentAttachment();
172 if (attachment != null && mSaveItem != null && mShareItem != null) {
173 mSaveItem.setEnabled(!attachment.isDownloading()
174 && attachment.canSave() && !attachment.isSavedToExternal());
175 final boolean canShare = attachment.canShare();
178 mDownloadAgainItem.setEnabled(attachment.canSave() && attachment.isDownloading());
183 mActionHandler.shouldShowExtraOption1(attachment.getContentType()));
196 // If one attachment ca
277 updateProgressAndEmptyViews( final PhotoViewFragment fragment, final Attachment attachment) argument
335 saveAttachment(final Attachment attachment) argument
369 shareAttachment(final Attachment attachment) argument
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/providers/
H A DEmlAttachmentProvider.java56 * of the regular attachment provider.
58 * One major difference is that all attachment info is stored in memory (with the
59 * exception of the attachment raw data which is stored in the cache). When
86 * Map that contains a mapping from an attachment list uri to a list of uris.
91 * Map that contains a mapping from an attachment uri to an {@link Attachment} object.
105 sUriMatcher.addURI(authority, "attachment/*/*/#", ATTACHMENT);
143 // form the attachment lists uri by clipping off the cid from the given uri
151 // find the attachment that contains the given cid
153 final Attachment attachment = mUriAttachmentMap.get(attachmentsUri);
154 if (TextUtils.equals(cid, attachment
259 addRow(MatrixCursor cursor, 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/UnifiedEmail/src/com/android/mail/utils/
H A DAttachmentUtils.java82 * Return a friendly localized file type for this attachment, or the empty string if
87 public static String getDisplayType(final Context context, final Attachment attachment) { argument
88 if ((attachment.flags & Attachment.FLAG_DUMMY_ATTACHMENT) != 0) {
89 // This is a dummy attachment, display blank for type.
96 final String contentType = attachment.getContentType();
103 String extension = Utils.getFileExtension(attachment.getName());
160 * Cache the file specified by the given attachment. This will attempt to use any
163 * @param attachment Attachment to be cached
166 * @return String file path for the cached attachment
168 // TODO(pwestbro): Once the attachment ha
171 cacheAttachmentUri(Context context, Attachment attachment, Bundle attachmentFds) argument
272 canDownloadAttachment(Context context, Attachment attachment) argument
[all...]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/internet/
H A DRfc822Output.java175 // Move to the first attachment; this must succeed because multipart is true
177 // If we've got one attachment and it's an ics "attachment", we want to send
212 * Write a single attachment and its payload
215 Attachment attachment) throws IOException, MessagingException {
217 attachment.mMimeType + ";\n name=\"" + attachment.mFileName + "\"");
221 if ((attachment.mFlags & Attachment.FLAG_ICS_ALTERNATIVE_PART) == 0) {
223 "attachment;"
224 + "\n filename=\"" + attachment
214 writeOneAttachment(Context context, Writer writer, OutputStream out, Attachment attachment) argument
[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 DMessageAttachmentBar.java56 * View for a single attachment in conversation view. Shows download status and allows launching
57 * intents to act on an attachment.
115 * Render or update an attachment's view. This happens immediately upon instantiation, and
119 public void render(Attachment attachment, Account account, ConversationMessage message, argument
125 mAttachment = attachment;
136 mSaveClicked = !attachment.isDownloading() ? false : mSaveClicked;
138 LogUtils.d(LOG_TAG, "got attachment list row: name=%s state/dest=%d/%d dled=%d" +
139 " contentUri=%s MIME=%s flags=%d", attachment.getName(), attachment.state,
140 attachment
[all...]
H A DAttachmentActionHandler.java47 private static final String PROGRESS_FRAGMENT_TAG = "attachment-progress";
84 public void setAttachment(Attachment attachment) { argument
85 mAttachment = attachment;
110 * Start downloading the full size attachment set with
124 Attachment attachment, int destination, int rendition, int additionalPriority,
133 mCommandHandler.sendCommand(attachment.uri, params);
143 public void startRedownloadingAttachment(Attachment attachment) { argument
146 params.put(AttachmentColumns.DESTINATION, attachment.destination);
148 mCommandHandler.sendCommand(attachment.uri, params);
282 Attachment attachment, FragmentManage
123 startDownloadingAttachment( Attachment attachment, int destination, int rendition, int additionalPriority, boolean delayDownload) argument
281 handleOption1(Context context, String account, Message message, Attachment attachment, FragmentManager fm) argument
[all...]
H A DMessageFooterView.java123 // Destroy the loader if we are attempting to load a different attachment
169 // before the attachment loader results are in, we can still render immediately using
186 for (Attachment attachment : attachments) {
190 if (!attachment.isInlineAttachment() || mCallbacks.isSecure()) {
191 if (AttachmentTile.isTiledAttachment(attachment)) {
192 tiledAttachments.add(attachment);
194 barAttachments.add(attachment);
226 for (Attachment attachment : barAttachments) {
227 final Uri id = attachment.getIdentifierUri();
238 barAttachmentView.render(attachment, accoun
[all...]
H A DMessageAttachmentTile.java50 * View for a single attachment in conversation view. Shows download status and allows launching
51 * intents to act on an attachment.
93 * Render or update an attachment's view. This happens immediately upon instantiation, and
97 public void render(Attachment attachment, int index, argument
99 render(attachment, attachmentPreviewCache);
175 LogUtils.e(LOG_TAG, "unable to view image attachment b/c handler is null");
219 // Download if there is network. This check prevents the attachment
/packages/apps/Email/src/com/android/email/service/
H A DAttachmentService.java81 // Try to download an attachment in the background this many times before giving up
131 // A map of attachment storage used per account as we have account based maximums to follow.
137 // A map of attachment ids to the number of failed attempts to download the attachment
142 // Keeps tracks of downloads in progress based on an attachment ID to DownloadRequest mapping.
163 * an attachment. These objects are constructed and either placed in the {@link DownloadQueue}
186 * @param attPriority The priority of this attachment
187 * @param attId The id of the row in the attachment table.
199 private DownloadRequest(final Context context, final Attachment attachment) { argument
200 mAttachmentId = attachment
506 getAttachmentUpdateValues(final Attachment attachment, final int statusCode, final int progress) argument
[all...]
H A DEmailServiceStub.java126 //1. Check if the attachment is already here and return early in that case
127 Attachment attachment =
129 if (attachment == null) {
134 final long messageId = attachment.mMessageKey;
137 EmailContent.Message.restoreMessageWithId(mContext, attachment.mMessageKey);
145 if (Utility.attachmentExists(mContext, attachment)
146 && attachment.mUiState == UIProvider.AttachmentState.SAVED) {
192 // 3. Generate a shell message in which to retrieve the attachment,
193 // and a shell BodyPart for the attachment. Then glue them together.
196 storePart.setSize((int)attachment
[all...]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/
H A DAttachmentUtilities.java126 * The maximum size of an attachment we're willing to download (either View or Save)
128 * so we should probably factor that in. A 5MB attachment will generally be around
133 * The maximum size of an attachment we're willing to upload (measured as stored on disk).
135 * so we should probably factor that in. A 5MB attachment will generally be around
167 * Return the filename for a given attachment. This should be used by any code that is
178 * Return the directory for a given attachment. This should be used by any code that is
214 * @return A likely mime type for the attachment
265 * Resolve attachment id to content URI. Returns the resolved content URI (from the attachment
294 * In support of deleting a message, find all attachments and delete associated attachment
396 saveAttachment(Context context, InputStream in, Attachment attachment) argument
[all...]
/packages/apps/Email/src/com/android/email/
H A DAttachmentInfo.java38 * Encapsulates commonly used attachment information related to suitability for viewing and saving,
39 * based on the attachment's filename and mimetype.
65 /** No receiving intent to handle attachment type */
82 /** Whether or not this attachment can be viewed */
84 /** Whether or not this attachment can be saved */
86 /** Whether or not this attachment can be installed [only true for APKs] */
88 /** Reason(s) why this attachment is denied from being viewed */
91 public AttachmentInfo(Context context, Attachment attachment) { argument
92 this(context, attachment.mId, attachment
[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/print/
H A DPrintUtils.java266 // If the message has more than one attachment, list the number of attachments.
276 final Attachment attachment = attachments.get(i);
278 if (attachment.isInlineAttachment()) {
285 .append(getIconFilename(attachment.getContentType()))
287 .append(attachment.getName())
289 AttachmentUtils.convertToHumanReadableSize(context, attachment.size))
299 * Returns an appropriate filename for various attachment mime types.
/packages/apps/Email/tests/src/com/android/email/service/
H A DAttachmentServiceTests.java453 final EmailContent.Attachment attachment = new EmailContent.Attachment();
454 attachment.mSize = 1000;
459 attachmentService.mServiceCallback.getAttachmentUpdateValues(attachment,
466 final EmailContent.Attachment attachment = new EmailContent.Attachment();
467 attachment.mSize = 1000;
472 attachmentService.mServiceCallback.getAttachmentUpdateValues(attachment,
479 final EmailContent.Attachment attachment = new EmailContent.Attachment();
480 attachment.mSize = 1000;
485 attachmentService.mServiceCallback.getAttachmentUpdateValues(attachment,
/packages/apps/Email/tests/src/com/android/email/
H A DLegacyConversionsTests.java118 Attachment attachment =
120 if ("100".equals(attachment.mLocation)) {
121 checkAttachment("attachment1Part", attachments.get(0), attachment,
123 } else if ("101".equals(attachment.mLocation)) {
124 checkAttachment("attachment2Part", attachments.get(1), attachment,
127 fail("Unexpected attachment with location " + attachment.mLocation);
136 * Test that only "attachment" or "inline" attachments are captured and added.
149 // 1. Standard attachment
154 "attachment;\
[all...]
/packages/apps/Mms/src/com/android/mms/ui/
H A DConversationListItem.java87 mAttachmentView = findViewById(R.id.attachment);
184 // When there's an error icon, the attachment icon is left of the error icon.
185 // When there is not an error icon, the attachment icon is left of the date text.
214 subjectLayout.addRule(RelativeLayout.LEFT_OF, hasAttachment ? R.id.attachment :

Completed in 360 milliseconds

12