/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
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...] |
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
|
/packages/apps/UnifiedEmail/src/com/android/mail/utils/ |
H A D | AttachmentUtils.java | 84 * Return a friendly localized file type for this attachment, or the empty string if 89 public static String getDisplayType(final Context context, final Attachment attachment) { argument 90 if ((attachment.flags & Attachment.FLAG_DUMMY_ATTACHMENT) != 0) { 91 // This is a dummy attachment, display blank for type. 98 final String contentType = attachment.getContentType(); 105 String extension = Utils.getFileExtension(attachment.getName()); 162 * Cache the file specified by the given attachment. This will attempt to use any 165 * @param attachment Attachment to be cached 168 * @return String file path for the cached attachment 170 // TODO(pwestbro): Once the attachment ha 173 cacheAttachmentUri(Context context, Attachment attachment, Bundle attachmentFds) argument 282 canDownloadAttachment(Context context, 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/compose/ |
H A D | AttachmentsView.java | 98 * Adds an attachment and updates the ui accordingly. 100 private void addAttachment(final Attachment attachment) { argument 101 mAttachments.add(attachment); 103 // If the attachment is inline do not display this attachment. 104 if (attachment.isInlineAttachment()) { 114 // If we have an attachment that should be shown in a tiled look, 116 if (AttachmentTile.isTiledAttachment(attachment)) { 118 mTileGrid.addComposeTileFromAttachment(attachment); 122 deleteAttachment(attachmentTile, attachment); 149 deleteAttachment(final View attachmentView, final Attachment attachment) argument 376 addAttachment(Account account, Attachment attachment) argument [all...] |
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()));
|
/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/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/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/Messaging/src/com/android/messaging/ui/ |
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...] |
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...] |
/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/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/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 | 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 | 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...] |
/packages/apps/Email/provider_src/com/android/email/service/ |
H A D | AttachmentService.java | 82 // Try to download an attachment in the background this many times before giving up 132 // A map of attachment storage used per account as we have account based maximums to follow. 138 // A map of attachment ids to the number of failed attempts to download the attachment 144 // Keeps tracks of downloads in progress based on an attachment ID to DownloadRequest mapping. 165 * an attachment. These objects are constructed and either placed in the {@link DownloadQueue} 188 * @param attPriority The priority of this attachment 189 * @param attId The id of the row in the attachment table. 201 private DownloadRequest(final Context context, final Attachment attachment) { argument 202 mAttachmentId = attachment 508 getAttachmentUpdateValues(final Attachment attachment, final int statusCode, final int progress) 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/Messaging/src/com/android/messaging/datamodel/data/ |
H A D | DraftMessageData.java | 157 // This is a pending attachment data from share intent (e.g. an shared image 186 for (final MessagePartData attachment : mAttachments) { 187 message.addPart(attachment); 277 // If the incoming attachments contains a single-only attachment, we need to clear 281 // clear any existing attachments because the attachment we're adding can only 287 // If the existing attachments contain a single-only attachment, we need to clear the 288 // existing attachments to make room for the incoming attachment. 291 // clear any existing attachments because the single attachment can only exist 297 // If any of the pending attachments contain a single-only attachment, we need to clear the 298 // existing attachments to make room for the incoming attachment 340 addOneAttachmentNoNotify(final MessagePartData attachment) argument 353 addAttachment(final MessagePartData attachment, final PendingAttachmentData pendingAttachment) argument 466 removeAttachment(final MessagePartData attachment) argument [all...] |
H A D | PendingAttachmentData.java | 30 * Represents a "pending" message part that acts as a placeholder for the actual attachment being 31 * loaded. It handles the task to load and persist the attachment from a Uri to local scratch 38 /** The state for when we are currently loading the attachment to the scratch space */ 41 /** The attachment has been successfully loaded and no longer pending */ 44 /** The attachment failed to load */ 49 /** The current state of the pending attachment. Refer to the STATE_* states above */ 54 * @param sourceUri the source Uri of the attachment. The Uri maybe temporary or remote, 65 * Creates a pending attachment data that is able to load from the given source uri and 130 protected void onPostExecute(final MessagePartData attachment) { 131 if (attachment ! [all...] |
/packages/apps/Bluetooth/src/com/android/bluetooth/mapclient/obex/ |
H A D | RequestGetMessage.java | 46 boolean attachment) { 58 oap.add(OAP_TAGID_ATTACHMENT, attachment ? ATTACHMENT_ON : ATTACHMENT_OFF); 45 RequestGetMessage(String handle, MasClient.CharsetType charset, boolean attachment) argument
|