/packages/apps/UnifiedEmail/src/com/android/mail/compose/ |
D | AttachmentsView.java | 96 private void addAttachment(final Attachment attachment) { in addAttachment() argument 97 mAttachments.add(attachment); in addAttachment() 100 if (attachment.isInlineAttachment()) { in addAttachment() 112 if (AttachmentTile.isTiledAttachment(attachment)) { in addAttachment() 114 mTileGrid.addComposeTileFromAttachment(attachment); in addAttachment() 118 deleteAttachment(attachmentTile, attachment); in addAttachment() 125 new AttachmentComposeView(getContext(), attachment); in addAttachment() 130 deleteAttachment(attachmentView, attachment); in addAttachment() 146 final Attachment attachment) { in deleteAttachment() argument 147 mAttachments.remove(attachment); in deleteAttachment() [all …]
|
D | AttachmentComposeView.java | 41 public AttachmentComposeView(Context c, Attachment attachment) { in AttachmentComposeView() argument 43 mAttachment = attachment; in AttachmentComposeView() 48 attachStr = attachment.toJSON().toString(2); in AttachmentComposeView() 50 attachStr = attachment.toString(); in AttachmentComposeView() 57 factory.inflate(R.layout.attachment, this); in AttachmentComposeView()
|
D | ComposeAttachmentTile.java | 33 public void render(Attachment attachment, AttachmentPreviewCache attachmentPreviewCache) { in render() argument 35 super.render(attachment, attachmentPreviewCache); in render() 37 getResources().getString(R.string.remove_attachment_desc, attachment.getName())); in render()
|
/packages/apps/UnifiedEmail/src/com/android/mail/photo/ |
D | MailPhotoViewController.java | 172 final Attachment attachment = getCurrentAttachment(); in updateActionItems() local 174 if (attachment != null && mSaveItem != null && mShareItem != null) { in updateActionItems() 175 mSaveItem.setEnabled(!attachment.isDownloading() in updateActionItems() 176 && attachment.canSave() && !attachment.isSavedToExternal()); in updateActionItems() 177 final boolean canShare = attachment.canShare(); in updateActionItems() 180 mDownloadAgainItem.setEnabled(attachment.canSave() && attachment.isDownloading()); in updateActionItems() 183 attachment.getContentType())); in updateActionItems() 234 final Attachment attachment = getCurrentAttachment(); in updateActionBar() local 237 mMailActivity.getContext(), attachment.size); in updateActionBar() 244 if (attachment.isSavedToExternal()) { in updateActionBar() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/providers/ |
D | EmlAttachmentProvider.java | 153 final Attachment attachment = mUriAttachmentMap.get(attachmentsUri); in query() local 154 if (TextUtils.equals(cid, attachment.partId)) { in query() 155 addRow(cursor, attachment); in query() 242 final Attachment attachment = mUriAttachmentMap.get(uri); in addRow() local 246 if (attachment.getContentType().startsWith(type)) { in addRow() 247 addRow(cursor, attachment); in addRow() 252 addRow(cursor, attachment); in addRow() 259 private static void addRow(MatrixCursor cursor, Attachment attachment) { in addRow() argument 261 .add(attachment.getName()) // displayName in addRow() 262 .add(attachment.size) // size in addRow() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
D | AttachmentTile.java | 69 public static boolean isTiledAttachment(final Attachment attachment) { in isTiledAttachment() argument 70 return ImageUtils.isImageMimeType(attachment.getContentType()); in isTiledAttachment() 109 protected void render(Attachment attachment, AttachmentPreviewCache attachmentPreviewCache) { in render() argument 110 if (attachment == null) { in render() 116 mAttachment = attachment; in render() 120 " contentUri=%s MIME=%s flags=%d", attachment.getName(), attachment.state, in render() 121 attachment.destination, attachment.downloadedSize, attachment.contentUri, in render() 122 attachment.getContentType(), attachment.flags); in render() 124 if ((attachment.flags & Attachment.FLAG_DUMMY_ATTACHMENT) != 0) { in render() 128 || !TextUtils.equals(attachment.getName(), prevAttachment.getName())) { in render() [all …]
|
D | AttachmentTileGrid.java | 81 for (Attachment attachment : list) { in configureGrid() 82 addMessageTileFromAttachment(attachment, index++, loaderResult); in configureGrid() 86 private void addMessageTileFromAttachment(Attachment attachment, int index, in addMessageTileFromAttachment() argument 99 attachmentTile.render(attachment, index, this, loaderResult); in addMessageTileFromAttachment() 102 public ComposeAttachmentTile addComposeTileFromAttachment(Attachment attachment) { in addComposeTileFromAttachment() argument 107 attachmentTile.render(attachment, this); in addComposeTileFromAttachment() 253 public void set(Attachment attachment, Bitmap preview) { in set() argument 254 final String attachmentIdentifier = attachment.getIdentifierUri().toString(); in set() 257 attachmentIdentifier, new AttachmentPreview(attachment, preview)); in set() 265 public Bitmap get(Attachment attachment) { in get() argument [all …]
|
D | ThumbnailLoadTask.java | 52 AttachmentBitmapHolder holder, Attachment attachment, Attachment prevAttachment) { in setupThumbnailPreview() argument 55 final Bitmap cached = cache.get(attachment); in setupThumbnailPreview() 64 if (attachment == null || width == 0 || height == 0 in setupThumbnailPreview() 65 || !ImageUtils.isImageMimeType(attachment.getContentType())) { in setupThumbnailPreview() 70 final Uri thumbnailUri = attachment.thumbnailUri; in setupThumbnailPreview() 71 final Uri contentUri = attachment.contentUri; in setupThumbnailPreview() 72 final Uri uri = attachment.getIdentifierUri(); in setupThumbnailPreview()
|
/packages/apps/Email/provider_src/com/android/email/service/ |
D | AttachmentService.java | 201 private DownloadRequest(final Context context, final Attachment attachment) { in DownloadRequest() argument 202 mAttachmentId = attachment.mId; in DownloadRequest() 203 final Message msg = Message.restoreMessageWithId(context, attachment.mMessageKey); in DownloadRequest() 210 mPriority = getAttachmentPriority(attachment); in DownloadRequest() 508 ContentValues getAttachmentUpdateValues(final Attachment attachment, in getAttachmentUpdateValues() argument 511 if (attachment != null) { in getAttachmentUpdateValues() 518 attachment.mSize * progress / 100); in getAttachmentUpdateValues() 546 final Attachment attachment = in loadAttachmentStatus() local 548 final ContentValues values = getAttachmentUpdateValues(attachment, statusCode, in loadAttachmentStatus() 551 attachment.update(AttachmentService.this, values); in loadAttachmentStatus() [all …]
|
D | EmailServiceStub.java | 128 Attachment attachment = in loadAttachment() local 130 if (attachment == null) { in loadAttachment() 135 final long messageId = attachment.mMessageKey; in loadAttachment() 138 EmailContent.Message.restoreMessageWithId(mContext, attachment.mMessageKey); in loadAttachment() 146 if (Utility.attachmentExists(mContext, attachment) in loadAttachment() 147 && attachment.mUiState == UIProvider.AttachmentState.SAVED) { in loadAttachment() 197 storePart.setSize((int)attachment.mSize); in loadAttachment() 199 attachment.mLocation); in loadAttachment() 202 attachment.mMimeType, in loadAttachment() 203 attachment.mFileName)); in loadAttachment() [all …]
|
/packages/apps/Email/tests/src/com/android/email/mail/transport/ |
D | SmtpSenderUnitTests.java | 147 Attachment attachment = setupSimpleAttachment(mProviderContext, message.mId); in testSendMessageWithEmptyAttachment() local 148 attachment.save(mProviderContext); in testSendMessageWithEmptyAttachment() 154 expectSimpleAttachment(mockTransport, attachment); in testSendMessageWithEmptyAttachment() 195 Attachment attachment = new Attachment(); in setupSimpleAttachment() local 196 attachment.mFileName = "the file.jpg"; in setupSimpleAttachment() 197 attachment.mMimeType = "image/jpg"; in setupSimpleAttachment() 198 attachment.mSize = 0; in setupSimpleAttachment() 199 attachment.mContentId = null; in setupSimpleAttachment() 200 attachment.setContentUri("content://com.android.email/1/1"); in setupSimpleAttachment() 201 attachment.mMessageKey = messageId; in setupSimpleAttachment() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/utils/ |
D | AttachmentUtils.java | 87 public static String getDisplayType(final Context context, final Attachment attachment) { in getDisplayType() argument 88 if ((attachment.flags & Attachment.FLAG_DUMMY_ATTACHMENT) != 0) { in getDisplayType() 96 final String contentType = attachment.getContentType(); in getDisplayType() 103 String extension = Utils.getFileExtension(attachment.getName()); in getDisplayType() 171 public static String cacheAttachmentUri(Context context, Attachment attachment, in cacheAttachmentUri() argument 176 if (attachment.size > 0) { in cacheAttachmentUri() 177 final long usableSpace = cacheDir.getUsableSpace() - attachment.size; in cacheAttachmentUri() 180 usableSpace, totalSpace, attachment); in cacheAttachmentUri() 191 && attachment.contentUri != null ? (ParcelFileDescriptor) attachmentFds in cacheAttachmentUri() 192 .getParcelable(attachment.contentUri.toString()) in cacheAttachmentUri() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ |
D | MessageAttachmentBar.java | 119 public void render(Attachment attachment, Account account, ConversationMessage message, in render() argument 125 mAttachment = attachment; in render() 136 mSaveClicked = !attachment.isDownloading() ? false : mSaveClicked; in render() 139 " contentUri=%s MIME=%s flags=%d", attachment.getName(), attachment.state, in render() 140 attachment.destination, attachment.downloadedSize, attachment.contentUri, in render() 141 attachment.getContentType(), attachment.flags); in render() 143 final String attachmentName = attachment.getName(); in render() 144 if ((attachment.flags & Attachment.FLAG_DUMMY_ATTACHMENT) != 0) { in render() 151 if (prevAttachment == null || attachment.size != prevAttachment.size) { in render() 153 AttachmentUtils.convertToHumanReadableSize(getContext(), attachment.size)); in render() [all …]
|
D | AttachmentActionHandler.java | 84 public void setAttachment(Attachment attachment) { in setAttachment() argument 85 mAttachment = attachment; in setAttachment() 124 Attachment attachment, int destination, int rendition, int additionalPriority, in startDownloadingAttachment() argument 133 mCommandHandler.sendCommand(attachment.uri, params); in startDownloadingAttachment() 143 public void startRedownloadingAttachment(Attachment attachment) { in startRedownloadingAttachment() argument 146 params.put(AttachmentColumns.DESTINATION, attachment.destination); in startRedownloadingAttachment() 148 mCommandHandler.sendCommand(attachment.uri, params); in startRedownloadingAttachment() 283 Attachment attachment, FragmentManager fm) { in handleOption1() argument
|
D | MessageFooterView.java | 186 for (Attachment attachment : attachments) { in renderAttachments() 190 if (!attachment.isInlineAttachment() || mCallbacks.isSecure()) { in renderAttachments() 191 if (AttachmentTile.isTiledAttachment(attachment)) { in renderAttachments() 192 tiledAttachments.add(attachment); in renderAttachments() 194 barAttachments.add(attachment); in renderAttachments() 226 for (Attachment attachment : barAttachments) { in renderBarAttachments() 227 final Uri id = attachment.getIdentifierUri(); in renderBarAttachments() 238 barAttachmentView.render(attachment, account, mMessageHeaderItem.getMessage(), in renderBarAttachments()
|
D | AttachmentProgressDialogFragment.java | 39 static AttachmentProgressDialogFragment newInstance(Attachment attachment) { in newInstance() argument 44 args.putParcelable(ATTACHMENT_KEY, attachment); in newInstance() 117 public boolean isShowingDialogForAttachment(Attachment attachment) { in isShowingDialogForAttachment() argument 119 && Objects.equal(attachment.getIdentifierUri(), mAttachment.getIdentifierUri()); in isShowingDialogForAttachment()
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/internet/ |
D | Rfc822Output.java | 215 Attachment attachment) throws IOException, MessagingException { in writeOneAttachment() argument 217 attachment.mMimeType + ";\n name=\"" + attachment.mFileName + "\""); in writeOneAttachment() 221 if ((attachment.mFlags & Attachment.FLAG_ICS_ALTERNATIVE_PART) == 0) { in writeOneAttachment() 224 + "\n filename=\"" + attachment.mFileName + "\";" in writeOneAttachment() 225 + "\n size=" + Long.toString(attachment.mSize)); in writeOneAttachment() 227 if (attachment.mContentId != null) { in writeOneAttachment() 228 writeHeader(writer, "Content-ID", attachment.mContentId); in writeOneAttachment() 236 if (attachment.mContentBytes != null) { in writeOneAttachment() 237 inStream = new ByteArrayInputStream(attachment.mContentBytes); in writeOneAttachment() 240 final String cachedFile = attachment.getCachedFileUri(); in writeOneAttachment() [all …]
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/ |
D | AttachmentUtilities.java | 396 public static void saveAttachment(Context context, InputStream in, Attachment attachment) { in saveAttachment() argument 397 final Uri uri = ContentUris.withAppendedId(Attachment.CONTENT_URI, attachment.mId); in saveAttachment() 399 final long attachmentId = attachment.mId; in saveAttachment() 400 final long accountId = attachment.mAccountKey; in saveAttachment() 406 if (attachment.mUiDestination == UIProvider.AttachmentDestination.CACHE) { in saveAttachment() 411 if (TextUtils.isEmpty(attachment.mFileName)) { in saveAttachment() 421 File file = Utility.createUniqueFile(downloads, attachment.mFileName); in saveAttachment() 432 final String mimeType = TextUtils.isEmpty(attachment.mMimeType) ? in saveAttachment() 434 attachment.mMimeType; in saveAttachment() 439 long id = dm.addCompletedDownload(attachment.mFileName, attachment.mFileName, in saveAttachment()
|
D | Utility.java | 648 public static boolean attachmentExists(Context context, Attachment attachment) { 649 if (attachment == null) { 651 } else if (attachment.mContentBytes != null) { 654 final String cachedFile = attachment.getCachedFileUri(); 672 final String contentUri = attachment.getContentUri();
|
/packages/apps/Email/tests/src/com/android/email/service/ |
D | AttachmentServiceTests.java | 453 final EmailContent.Attachment attachment = new EmailContent.Attachment(); in testServiceCallbackAttachmentCompleteUpdate() local 454 attachment.mSize = 1000; in testServiceCallbackAttachmentCompleteUpdate() 459 attachmentService.mServiceCallback.getAttachmentUpdateValues(attachment, in testServiceCallbackAttachmentCompleteUpdate() 466 final EmailContent.Attachment attachment = new EmailContent.Attachment(); in testServiceCallbackAttachmentErrorUpdate() local 467 attachment.mSize = 1000; in testServiceCallbackAttachmentErrorUpdate() 472 attachmentService.mServiceCallback.getAttachmentUpdateValues(attachment, in testServiceCallbackAttachmentErrorUpdate() 479 final EmailContent.Attachment attachment = new EmailContent.Attachment(); in testServiceCallbackAttachmentInProgressUpdate() local 480 attachment.mSize = 1000; in testServiceCallbackAttachmentInProgressUpdate() 485 attachmentService.mServiceCallback.getAttachmentUpdateValues(attachment, in testServiceCallbackAttachmentInProgressUpdate()
|
/packages/apps/Email/provider_src/com/android/email/ |
D | AttachmentInfo.java | 91 public AttachmentInfo(Context context, Attachment attachment) { in AttachmentInfo() argument 92 this(context, attachment.mId, attachment.mSize, attachment.mFileName, attachment.mMimeType, in AttachmentInfo() 93 attachment.mAccountKey, attachment.mFlags); in AttachmentInfo()
|
/packages/apps/Email/tests/src/com/android/email/ |
D | LegacyConversionsTests.java | 118 Attachment attachment = in convertAndCheckcheckAddedAttachments() local 120 if ("100".equals(attachment.mLocation)) { in convertAndCheckcheckAddedAttachments() 121 checkAttachment("attachment1Part", attachments.get(0), attachment, in convertAndCheckcheckAddedAttachments() 123 } else if ("101".equals(attachment.mLocation)) { in convertAndCheckcheckAddedAttachments() 124 checkAttachment("attachment2Part", attachments.get(1), attachment, in convertAndCheckcheckAddedAttachments() 127 fail("Unexpected attachment with location " + attachment.mLocation); in convertAndCheckcheckAddedAttachments()
|
/packages/apps/UnifiedEmail/src/com/android/mail/print/ |
D | PrintUtils.java | 278 final Attachment attachment = attachments.get(i); in renderAttachments() local 280 if (attachment.isInlineAttachment()) { in renderAttachments() 287 .append(getIconFilename(attachment.getContentType())) in renderAttachments() 289 .append(attachment.getName()) in renderAttachments() 291 AttachmentUtils.convertToHumanReadableSize(context, attachment.size)) in renderAttachments()
|
/packages/apps/Exchange/src/com/android/exchange/eas/ |
D | EasLoadAttachment.java | 109 final EmailContent.Attachment attachment) { in ProgressCallback() argument 111 mAttachment = attachment; in ProgressCallback() 256 … private boolean finishLoadAttachment(final EmailContent.Attachment attachment, final File file) { in finishLoadAttachment() argument 265 AttachmentUtilities.saveAttachment(mContext, in, attachment); in finishLoadAttachment()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/map/ |
D | BluetoothMapAppParams.java | 650 public void setAttachment(int attachment) throws IllegalArgumentException { in setAttachment() argument 651 if (attachment < 0 || attachment > 0x0001) in setAttachment() 653 this.mAttachment = attachment; in setAttachment()
|