/packages/apps/Email/tests/src/com/android/email/provider/ |
D | PolicyTests.java | 28 import com.android.emailcommon.provider.EmailContent.Attachment; 47 Attachment.FLAG_POLICY_DISALLOWS_DOWNLOAD + ")!=0"; 118 private Attachment setupSimpleAttachment(String name, long size, Account acct) { in setupSimpleAttachment() 119 Attachment att = ProviderTestUtils.setupAttachment(-1, name, size, false, mMockContext); in setupSimpleAttachment() 131 ArrayList<Attachment> atts = new ArrayList<Attachment>(); in testSetAttachmentFlagsForNewPolicy() 132 Attachment att1 = setupSimpleAttachment("fileName1", 10001L, acct); in testSetAttachmentFlagsForNewPolicy() 134 Attachment att2 = setupSimpleAttachment("fileName2", 20001L, acct); in testSetAttachmentFlagsForNewPolicy() 141 Attachment att3 = setupSimpleAttachment("fileName3", 70001L, acct); in testSetAttachmentFlagsForNewPolicy() 143 Attachment att4 = setupSimpleAttachment("fileName4", 5001L, acct); in testSetAttachmentFlagsForNewPolicy() 148 assertEquals(4, EmailContent.count(mMockContext, Attachment.CONTENT_URI)); in testSetAttachmentFlagsForNewPolicy() [all …]
|
D | AttachmentProviderTests.java | 35 import com.android.emailcommon.provider.EmailContent.Attachment; 59 super(AttachmentProvider.class, Attachment.ATTACHMENT_PROVIDER_LEGACY_URI_PREFIX); in AttachmentProviderTests() 107 Attachment newAttachment1 = ProviderTestUtils.setupAttachment(message1Id, "file1", 100, in testQuery() 114 Attachment newAttachment2 = ProviderTestUtils.setupAttachment(message1Id, "file2", 200, in testQuery() 121 Attachment newAttachment3 = ProviderTestUtils.setupAttachment(message1Id, "file3", 300, in testQuery() 226 Attachment.CONTENT_URI, AttachmentInfo.PROJECTION, in testInboxQuery() 227 EmailContent.Attachment.PRECACHE_SELECTION, in testInboxQuery() 228 null, Attachment.RECORD_ID + " DESC"); in testInboxQuery() 237 Attachment.CONTENT_URI, AttachmentInfo.PROJECTION, in testInboxQuery() 238 EmailContent.Attachment.PRECACHE_INBOX_SELECTION, in testInboxQuery() [all …]
|
D | ProviderTests.java | 41 import com.android.emailcommon.provider.EmailContent.Attachment; 464 ArrayList<Attachment> atts = new ArrayList<Attachment>(); in testMessageWithAttachment() 483 c = mMockContext.getContentResolver().query(Attachment.CONTENT_URI, in testMessageWithAttachment() 484 Attachment.CONTENT_PROJECTION, AttachmentColumns.MESSAGE_KEY + "=?", in testMessageWithAttachment() 490 Attachment actual = EmailContent.getContent(mMockContext, c, Attachment.class); in testMessageWithAttachment() 515 ArrayList<Attachment> atts = new ArrayList<Attachment>(); in testMessageSaveWithJustAttachments() 535 c = mMockContext.getContentResolver().query(Attachment.CONTENT_URI, in testMessageSaveWithJustAttachments() 536 Attachment.CONTENT_PROJECTION, AttachmentColumns.MESSAGE_KEY + "=?", in testMessageSaveWithJustAttachments() 542 Attachment actual = EmailContent.getContent(mMockContext, c, Attachment.class); in testMessageSaveWithJustAttachments() 551 Attachment[] attachments = in testMessageSaveWithJustAttachments() [all …]
|
D | ProviderTestUtils.java | 22 import com.android.emailcommon.provider.EmailContent.Attachment; 235 public static Attachment setupAttachment(long messageId, String fileName, long length, in setupAttachment() 237 Attachment att = new Attachment(); in setupAttachment() 265 public static Attachment setupAttachment(long messageId, String fileName, long length, in setupAttachment() 429 public static void assertAttachmentEqual(String caller, Attachment expect, Attachment actual) { in assertAttachmentEqual()
|
/packages/apps/Email/provider_src/com/android/email/service/ |
D | AttachmentService.java | 41 import com.android.emailcommon.provider.EmailContent.Attachment; 201 private DownloadRequest(final Context context, final Attachment attachment) { in DownloadRequest() 508 ContentValues getAttachmentUpdateValues(final Attachment attachment, in getAttachmentUpdateValues() 546 final Attachment attachment = in loadAttachmentStatus() 547 Attachment.restoreAttachmentWithId(AttachmentService.this, attachmentId); in loadAttachmentStatus() 666 final int mask = Attachment.FLAG_DOWNLOAD_FORWARD | Attachment.FLAG_DOWNLOAD_USER_REQUEST; in run() 667 final Cursor c = getContentResolver().query(Attachment.CONTENT_URI, in run() 674 final Attachment attachment = Attachment.restoreAttachmentWithId( in run() 749 public synchronized void onChange(final Context context, final Attachment att) { in onChange() 777 if (((att.mFlags & Attachment.FLAG_DOWNLOAD_USER_REQUEST) != 0) || in onChange() [all …]
|
D | Pop3Service.java | 46 import com.android.emailcommon.provider.EmailContent.Attachment; 82 Attachment att = Attachment.restoreAttachmentWithId(mContext, attachmentId); 393 Cursor c = resolver.query(Attachment.CONTENT_URI, Attachment.CONTENT_PROJECTION, in synchronizePop3Mailbox() 401 Attachment att = new Attachment(); in synchronizePop3Mailbox() 406 resolver.update(ContentUris.withAppendedId(Attachment.CONTENT_URI, att.mId), in synchronizePop3Mailbox() 413 Uri attUri = ContentUris.withAppendedId(Attachment.CONTENT_URI, att.mId); in synchronizePop3Mailbox()
|
/packages/apps/UnifiedEmail/src/com/android/mail/photo/ |
D | MailPhotoViewController.java | 42 import com.android.mail.providers.Attachment; 172 final Attachment attachment = getCurrentAttachment(); in updateActionItems() 191 List<Attachment> attachments = getAllAttachments(); in updateActionItems() 194 for (final Attachment a : attachments) { in updateActionItems() 205 for (final Attachment a : attachments) { in updateActionItems() 234 final Attachment attachment = getCurrentAttachment(); in updateActionBar() 258 final Attachment attachment = getCurrentAttachment(); in onFragmentVisible() 268 updateProgressAndEmptyViews(fragment, new Attachment(cursor)); in onCursorChanged() 277 final PhotoViewFragment fragment, final Attachment attachment) { in updateProgressAndEmptyViews() 319 final Attachment attachment = getCurrentAttachment(); in redownloadAttachment() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/providers/ |
D | Attachment.java | 55 public class Attachment implements Parcelable { class 179 public Attachment() { in Attachment() method in Attachment 182 public Attachment(Parcel in) { in Attachment() method in Attachment 200 public Attachment(Cursor cursor) { in Attachment() method in Attachment 226 public Attachment(JSONObject srcJson) { in Attachment() method in Attachment 247 public Attachment(Context context, Part part, Uri emlFileUri, String messageId, String cid, in Attachment() method in Attachment 301 public Attachment(ContentValues values) { in Attachment() method in Attachment 557 final Attachment that = (Attachment) o; in equals() 628 public static String toJSONArray(Collection<? extends Attachment> attachments) { in toJSONArray() 634 for (Attachment attachment : attachments) { in toJSONArray() [all …]
|
D | EmlAttachmentProvider.java | 93 private Map<Uri, Attachment> mUriAttachmentMap; 153 final Attachment attachment = mUriAttachmentMap.get(attachmentsUri); in query() 186 if (mUriAttachmentMap.put(uri, new Attachment(values)) == null) { in insert() 242 final Attachment attachment = mUriAttachmentMap.get(uri); in addRow() 259 private static void addRow(MatrixCursor cursor, Attachment attachment) { in addRow() 296 final Attachment attachment = mUriAttachmentMap.get(uri); in copyAttachment() 471 final Attachment attachment = mUriAttachmentMap.get(uri); in getFilePath()
|
/packages/apps/Email/provider_src/com/android/email/ |
D | LegacyConversions.java | 42 import com.android.emailcommon.provider.EmailContent.Attachment; 195 protected static Attachment mimePartToAttachment(final Part part) throws MessagingException { in mimePartToAttachment() 225 final Attachment localAttachment = new Attachment(); in mimePartToAttachment() 260 final Attachment localAttachment = mimePartToAttachment(part); in addOneAttachment() 273 final Uri uri = ContentUris.withAppendedId(Attachment.MESSAGE_ID_URI, localMessage.mId); in addOneAttachment() 274 final Cursor cursor = context.getContentResolver().query(uri, Attachment.CONTENT_PROJECTION, in addOneAttachment() 279 final Attachment dbAttachment = new Attachment(); in addOneAttachment() 310 localMessage.mAttachments = new ArrayList<Attachment>(); in addOneAttachment() 320 final Attachment localAttachment, long accountId) in saveAttachmentBody() 361 final Uri uri = ContentUris.withAppendedId(Attachment.CONTENT_URI, attachmentId); in saveAttachmentBody() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ |
D | MessageFooterView.java | 41 import com.android.mail.providers.Attachment; 161 final List<Attachment> attachments; in renderAttachments() 176 private void renderAttachments(List<Attachment> attachments, boolean loaderResult) { in renderAttachments() 183 final List<Attachment> tiledAttachments = new ArrayList<Attachment>(maxSize); in renderAttachments() 184 final List<Attachment> barAttachments = new ArrayList<Attachment>(maxSize); in renderAttachments() 186 for (Attachment attachment : attachments) { in renderAttachments() 199 mMessageHeaderItem.getMessage().attachmentsJson = Attachment.toJSONArray(attachments); in renderAttachments() 214 private void renderTiledAttachments(List<Attachment> tiledAttachments, boolean loaderResult) { in renderTiledAttachments() 222 private void renderBarAttachments(List<Attachment> barAttachments, boolean loaderResult) { in renderBarAttachments() 226 for (Attachment attachment : barAttachments) { in renderBarAttachments()
|
D | AttachmentLoader.java | 28 import com.android.mail.providers.Attachment; 46 private Map<String, Attachment> mCache = Maps.newHashMap(); 52 public Attachment get() { in get() 54 Attachment m = mCache.get(uri); in get() 56 m = new Attachment(this); in get()
|
D | AttachmentActionHandler.java | 33 import com.android.mail.providers.Attachment; 51 private Attachment mAttachment; 84 public void setAttachment(Attachment attachment) { in setAttachment() 124 Attachment attachment, int destination, int rendition, int additionalPriority, in startDownloadingAttachment() 143 public void startRedownloadingAttachment(Attachment attachment) { in startRedownloadingAttachment() 283 Attachment attachment, FragmentManager fm) { in handleOption1()
|
D | MessageAttachmentBar.java | 45 import com.android.mail.providers.Attachment; 63 private Attachment mAttachment; 119 public void render(Attachment attachment, Account account, ConversationMessage message, in render() 124 final Attachment prevAttachment = mAttachment; in render() 144 if ((attachment.flags & Attachment.FLAG_DUMMY_ATTACHMENT) != 0) { in render() 247 if ((mAttachment.flags & Attachment.FLAG_DUMMY_ATTACHMENT) != 0) { in onClick()
|
/packages/apps/UnifiedEmail/src/com/android/mail/compose/ |
D | AttachmentsView.java | 37 import com.android.mail.providers.Attachment; 57 private final ArrayList<Attachment> mAttachments; 100 private void addAttachment(final Attachment attachment) { in addAttachment() 150 final Attachment attachment) { in deleteAttachment() 162 public ArrayList<Attachment> getAttachments() { in getAttachments() 196 for (Attachment attachment : mAttachments) { in getTotalAttachmentsSize() 254 public Attachment generateLocalAttachment(Uri contentUri) throws AttachmentFailureException { in generateLocalAttachment() 265 final Attachment attachment = new Attachment(); in generateLocalAttachment() 376 public void addAttachment(Account account, Attachment attachment) in addAttachment() 432 Attachment lastAttachment = mAttachments.get(mAttachments.size() - 1); in focusLastAttachment()
|
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
D | AttachmentTile.java | 36 import com.android.mail.providers.Attachment; 46 protected Attachment mAttachment; 69 public static boolean isTiledAttachment(final Attachment attachment) { in isTiledAttachment() 100 public Attachment getAttachment() { in getAttachment() 109 protected void render(Attachment attachment, AttachmentPreviewCache attachmentPreviewCache) { in render() 115 final Attachment prevAttachment = mAttachment; in render() 124 if ((attachment.flags & Attachment.FLAG_DUMMY_ATTACHMENT) != 0) { in render() 277 public AttachmentPreview(Attachment attachment, Bitmap preview) { in AttachmentPreview() 284 void set(Attachment attachment, Bitmap preview); in set() 285 Bitmap get(Attachment attachment); in get()
|
D | AttachmentTileGrid.java | 34 import com.android.mail.providers.Attachment; 54 private List<Attachment> mAttachments; 73 ConversationMessage message, List<Attachment> list, boolean loaderResult) { in configureGrid() 81 for (Attachment attachment : list) { in configureGrid() 86 private void addMessageTileFromAttachment(Attachment attachment, int index, in addMessageTileFromAttachment() 102 public ComposeAttachmentTile addComposeTileFromAttachment(Attachment attachment) { in addComposeTileFromAttachment() 233 public List<Attachment> getAttachments() { in getAttachments() 253 public void set(Attachment attachment, Bitmap preview) { in set() 265 public Bitmap get(Attachment attachment) { in get()
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/ |
D | EmailContent.java | 198 Attachment.initAttachment(); in init() 930 transient public ArrayList<Attachment> mAttachments = null; 1110 final Attachment a = mAttachments.get(i); in save() 1199 for (Attachment att: mAttachments) { in addSaveOps() 1203 b = ContentProviderOperation.newInsert(Attachment.CONTENT_URI) in addSaveOps() 1330 public static final class Attachment extends EmailContent implements Parcelable { class in EmailContent 1437 public Attachment() { in Attachment() method in EmailContent.Attachment 1456 if (!Attachment.sUsingLegacyPrefix && in getContentUri() 1457 mContentUri.startsWith(Attachment.ATTACHMENT_PROVIDER_LEGACY_URI_PREFIX)) { in getContentUri() 1480 public static Attachment restoreAttachmentWithId(Context context, long id) { in restoreAttachmentWithId() [all …]
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/ |
D | AttachmentUtilities.java | 32 import com.android.emailcommon.provider.EmailContent.Attachment; 143 sUri = Uri.parse(Attachment.ATTACHMENT_PROVIDER_URI_PREFIX); in getAttachmentUri() 155 sUri = Uri.parse(Attachment.ATTACHMENT_PROVIDER_URI_PREFIX); in getAttachmentThumbnailUri() 301 Uri uri = ContentUris.withAppendedId(Attachment.MESSAGE_ID_URI, messageId); in deleteAllAttachmentFiles() 302 Cursor c = context.getContentResolver().query(uri, Attachment.ID_PROJECTION, in deleteAllAttachmentFiles() 306 long attachmentId = c.getLong(Attachment.ID_PROJECTION_COLUMN); in deleteAllAttachmentFiles() 327 final Uri uri = ContentUris.withAppendedId(Attachment.MESSAGE_ID_URI, messageId); in deleteAllCachedAttachmentFiles() 396 public static void saveAttachment(Context context, InputStream in, Attachment attachment) { in saveAttachment() 397 final Uri uri = ContentUris.withAppendedId(Attachment.CONTENT_URI, attachment.mId); in saveAttachment()
|
D | Utility.java | 37 import com.android.emailcommon.provider.EmailContent.Attachment; 648 public static boolean attachmentExists(Context context, Attachment attachment) { 708 Attachment[] atts = Attachment.restoreAttachmentsWithMessageId(context, messageId); 709 for (Attachment att: atts) { 715 if ((att.mFlags & (Attachment.FLAG_DOWNLOAD_FORWARD | 716 Attachment.FLAG_DOWNLOAD_USER_REQUEST)) == 0) { 729 Attachment.delete(context, Attachment.CONTENT_URI, att.mId); 735 Attachment.update(context, Attachment.CONTENT_URI, att.mId, cv);
|
/packages/apps/Email/tests/src/com/android/emailcommon/internet/ |
D | Rfc822OutputTests.java | 27 import com.android.emailcommon.provider.EmailContent.Attachment; 147 msg.mAttachments = new ArrayList<Attachment>(); in testWriteToAlternativePart() 149 Attachment att = new Attachment(); in testWriteToAlternativePart() 151 att.mFlags = Attachment.FLAG_ICS_ALTERNATIVE_PART; in testWriteToAlternativePart() 192 msg.mAttachments = new ArrayList<Attachment>(); in testWriteToMixedPart() 194 Attachment att = new Attachment(); in testWriteToMixedPart()
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/internet/ |
D | Rfc822Output.java | 27 import com.android.emailcommon.provider.EmailContent.Attachment; 124 boolean useSmartReply, boolean sendBcc, List<Attachment> attachments) in writeTo() 162 Arrays.asList(Attachment.restoreAttachmentsWithMessageId(context, message.mId)); in writeTo() 180 if ((flags & Attachment.FLAG_ICS_ALTERNATIVE_PART) != 0) { in writeTo() 197 for (final Attachment att: attachments) { in writeTo() 215 Attachment attachment) throws IOException, MessagingException { in writeOneAttachment() 221 if ((attachment.mFlags & Attachment.FLAG_ICS_ALTERNATIVE_PART) == 0) { in writeOneAttachment()
|
/packages/apps/Email/tests/src/com/android/email/ |
D | LegacyConversionsTests.java | 41 import com.android.emailcommon.provider.EmailContent.Attachment; 112 Uri uri = ContentUris.withAppendedId(Attachment.MESSAGE_ID_URI, localMessage.mId); in convertAndCheckcheckAddedAttachments() 113 Cursor c = mProviderContext.getContentResolver().query(uri, Attachment.CONTENT_PROJECTION, in convertAndCheckcheckAddedAttachments() 118 Attachment attachment = in convertAndCheckcheckAddedAttachments() 119 Attachment.getContent(mProviderContext, c, Attachment.class); in convertAndCheckcheckAddedAttachments() 207 Uri uri = ContentUris.withAppendedId(Attachment.MESSAGE_ID_URI, localMessage.mId); in brokentestAddDuplicateAttachments() 288 private void checkAttachment(String tag, Part expected, EmailContent.Attachment actual, in checkAttachment()
|
/packages/apps/Email/tests/src/com/android/email/mail/transport/ |
D | SmtpSenderUnitTests.java | 29 import com.android.emailcommon.provider.EmailContent.Attachment; 147 Attachment attachment = setupSimpleAttachment(mProviderContext, message.mId); in testSendMessageWithEmptyAttachment() 194 private Attachment setupSimpleAttachment(Context context, long messageId) { in setupSimpleAttachment() 195 Attachment attachment = new Attachment(); in setupSimpleAttachment() 211 private void expectSimpleAttachment(MockTransport mockTransport, Attachment attachment) { in expectSimpleAttachment()
|
/packages/apps/Email/provider_src/com/android/email/provider/ |
D | DBHelper.java | 41 import com.android.emailcommon.provider.EmailContent.Attachment; 361 " begin delete from " + Attachment.TABLE_NAME + in createMessageTable() 652 db.execSQL("create table " + Attachment.TABLE_NAME + s); in createAttachmentTable() 653 db.execSQL(createIndex(Attachment.TABLE_NAME, AttachmentColumns.MESSAGE_KEY)); in createAttachmentTable() 658 db.execSQL("drop table " + Attachment.TABLE_NAME); in resetAttachmentTable() 945 db.execSQL("alter table " + Attachment.TABLE_NAME in onUpgrade() 947 db.execSQL("alter table " + Attachment.TABLE_NAME in onUpgrade() 957 db.execSQL("alter table " + Attachment.TABLE_NAME in onUpgrade() 998 db.execSQL("alter table " + Attachment.TABLE_NAME in onUpgrade() 1001 db.execSQL("update " + Attachment.TABLE_NAME + " set " + in onUpgrade() [all …]
|