/packages/apps/UnifiedEmail/src/com/android/mail/compose/ |
H A D | AttachmentComposeView.java | 34 * 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 D | ComposeAttachmentTile.java | 33 public void render(Attachment attachment, AttachmentPreviewCache attachmentPreviewCache) { argument 35 super.render(attachment, attachmentPreviewCache); 37 getResources().getString(R.string.remove_attachment_desc, attachment.getName()));
|
H A D | AttachmentsView.java | 94 * 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...] |
/packages/apps/Email/provider_src/com/android/email/ |
H A D | NotificationController.java | 27 void showDownloadForwardFailedNotificationSynchronous(Attachment attachment); argument
|
H A D | AttachmentInfo.java | 38 * 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/Messaging/src/com/android/messaging/ui/attachmentchooser/ |
H A D | AttachmentGridItemView.java | 34 * Shows an item in the attachment picker grid. 38 boolean isItemSelected(MessagePartData attachment); argument 39 void onItemCheckedChanged(AttachmentGridItemView view, MessagePartData attachment); argument 40 void onItemClicked(AttachmentGridItemView view, MessagePartData attachment); argument 88 // to make the attachment preview square. 92 public void bind(final MessagePartData attachment, final HostInterface hostInterface) { argument 93 Assert.isTrue(attachment.isAttachment()); 96 if (mAttachmentData == null || !mAttachmentData.equals(attachment)) { 97 mAttachmentData = attachment;
|
H A D | AttachmentGridView.java | 36 * Displays a grid of attachment previews for the user to choose which to select/unselect 59 public boolean isItemSelected(final MessagePartData attachment) { argument 60 return !mUnselectedSet.contains(attachment); 64 public void onItemClicked(final AttachmentGridItemView view, final MessagePartData attachment) { argument 67 if (attachment.isImage()) { 68 mHost.displayPhoto(UiUtils.getMeasuredBoundsOnScreen(view), attachment.getContentUri()); 73 public void onItemCheckedChanged(AttachmentGridItemView view, MessagePartData attachment) { argument 75 if (isItemSelected(attachment)) { 76 mUnselectedSet.add(attachment); 78 mUnselectedSet.remove(attachment); [all...] |
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ |
H A D | AttachmentProgressDialogFragment.java | 32 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 D | AttachmentActionHandler.java | 47 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); 283 Attachment attachment, FragmentManage 123 startDownloadingAttachment( Attachment attachment, int destination, int rendition, int additionalPriority, boolean delayDownload) argument 282 handleOption1(Context context, String account, Message message, Attachment attachment, FragmentManager fm) argument [all...] |
H A D | MessageAttachmentBar.java | 56 * 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 D | MessageAttachmentTile.java | 50 * 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/UnifiedEmail/src/com/android/mail/ui/ |
H A D | ThumbnailLoadTask.java | 52 AttachmentBitmapHolder holder, Attachment attachment, Attachment prevAttachment) { 55 final Bitmap cached = cache.get(attachment); 64 if (attachment == null || width == 0 || height == 0 65 || !ImageUtils.isImageMimeType(attachment.getContentType())) { 70 final Uri thumbnailUri = attachment.thumbnailUri; 71 final Uri contentUri = attachment.contentUri; 72 final Uri uri = attachment.getIdentifierUri(); 51 setupThumbnailPreview(AttachmentTile.AttachmentPreviewCache cache, AttachmentBitmapHolder holder, Attachment attachment, Attachment prevAttachment) argument
|
H A D | AttachmentTile.java | 42 * 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 277 AttachmentPreview(Attachment attachment, Bitmap preview) argument 284 set(Attachment attachment, Bitmap preview) argument 285 get(Attachment attachment) argument [all...] |
H A D | AttachmentTileGrid.java | 79 // 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...] |
/packages/apps/UnifiedEmail/src/com/android/mail/utils/ |
H A D | AttachmentUtils.java | 82 * 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 D | Rfc822Output.java | 175 // 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/Email/tests/src/com/android/email/mail/transport/ |
H A D | SmtpSenderUnitTests.java | 134 * 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 D | EasLoadAttachment.java | 73 * @param account The account we're loading the attachment for. 74 * @param attachmentId The local id of the attachment (i.e. its id in the database). 109 final EmailContent.Attachment attachment) { 111 mAttachment = attachment; 121 * Encoder for Exchange 2003 attachment names. They come from the server partially encoded, 127 // These four characters are commonly received in EAS 2.5 attachment names and are 134 * Finish encoding attachment names for Exchange 2003. 146 * Finish encoding attachment names for Exchange 2003. 153 LogUtils.e(LOG_TAG, "Could not load attachment %d", mAttachmentId); 173 // First callback to let the client know that we have started the attachment loa 108 ProgressCallback(final IEmailServiceCallback callback, final EmailContent.Attachment attachment) argument 256 finishLoadAttachment(final EmailContent.Attachment attachment, final File file) argument [all...] |
/packages/apps/Messaging/src/com/android/messaging/ui/ |
H A D | AttachmentPreview.java | 80 // The attachment preview is a scroll view so that it can show the bottom portion of the 81 // attachment whenever the space is tight (e.g. when in landscape mode). Per design 82 // request we'd like to make the attachment view always scrolled to the bottom. 205 // Merge the pending attachment list with real attachment. Design would prefer these be 237 final MessagePartData attachment = combinedAttachments.get(0); 245 attachment instanceof MediaPickerMessagePartData) { 247 .findViewForAttachment(attachment); 251 attachment instanceof MediaPickerMessagePartData) { 252 ((MediaPickerMessagePartData) attachment) 318 onAttachmentClick(final MessagePartData attachment, final Rect viewBoundsOnScreen, final boolean longPress) argument [all...] |
H A D | MultiAttachmentLayout.java | 50 * following attachment layout: 71 boolean onAttachmentClick(MessagePartData attachment, Rect viewBoundsOnScreen, argument 132 null, // Doesn't support one attachment. Single attachment preview is used instead. 144 null, // Doesn't support one attachment. Single attachment preview is used instead. 233 final MessagePartData attachment = iterator.next(); 238 if (previousView.attachment.equals(attachment) && 239 !(previousView.attachment instanceo 400 findViewForAttachment(final MessagePartData attachment) argument 412 final MessagePartData attachment; field in class:MultiAttachmentLayout.ViewWrapper 419 ViewWrapper(final View view, final MessagePartData attachment) argument [all...] |
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/ |
H A D | AttachmentUtilities.java | 126 * 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/UnifiedEmail/src/com/android/mail/photo/ |
H A D | MailPhotoViewController.java | 172 final Attachment attachment = getCurrentAttachment(); 174 if (attachment != null && mSaveItem != null && mShareItem != null) { 175 mSaveItem.setEnabled(!attachment.isDownloading() 176 && attachment.canSave() && !attachment.isSavedToExternal()); 177 final boolean canShare = attachment.canShare(); 180 mDownloadAgainItem.setEnabled(attachment.canSave() && attachment.isDownloading()); 183 attachment.getContentType())); 195 // If one attachment ca 276 updateProgressAndEmptyViews( final PhotoViewFragment fragment, final Attachment attachment) argument 334 saveAttachment(final Attachment attachment) argument 368 shareAttachment(final Attachment attachment) argument [all...] |
/packages/apps/UnifiedEmail/src/com/android/mail/providers/ |
H A D | EmlAttachmentProvider.java | 56 * 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/src/com/android/email/ |
H A D | EmailNotificationController.java | 384 * Show (or update) a notification that the given attachment could not be forwarded. This 391 public void showDownloadForwardFailedNotificationSynchronous(Attachment attachment) { argument 392 final Message message = Message.restoreMessageWithId(mContext, attachment.mMessageKey); 398 attachment.mFileName,
|
/packages/apps/Messaging/src/com/android/messaging/ui/conversation/ |
H A D | ConversationMessageView.java | 85 boolean onAttachmentClick(ConversationMessageView view, MessagePartData attachment, argument 543 // We will show the message image view if there is one attachment or one youtube link 602 // Find the first attachment index that matches the given type if possible. 610 for (final MessagePartData attachment : mData.getAttachments(attachmentTypeFilter)) { 619 viewBinder.bindView(attachmentView, attachment); 620 attachmentView.setTag(attachment); 696 // Text and attachment(s) 882 // If there are multiple attachment bubbles in a single message, add some separation. 997 // We don't know the size of the image attachment, enable letterboxing on the image 998 // and show a fixed sized attachment 1047 onAttachmentClick(final MessagePartData attachment, final Rect viewBoundsOnScreen, final boolean longPress) argument 1093 bindView(View view, MessagePartData attachment) argument [all...] |