Commit Graph

569 Commits

Author SHA1 Message Date
Jin Cao 99e882e22d Support the new MOVE_FAILED_TO_DRAFT operation in Email
Default the MOVE_FAILED_TO_DRAFT action to simply deleting
the failed message from Outbox for Email since this is the
current behavior.

b/4080109

Change-Id: I74917d0b2581e2dd145906dddfac395efc2d8206
2014-08-01 17:15:44 -07:00
Andrew Sapperstein 0a17fcfae5 temp fix for b/16730607
Change-Id: I1474955d82442ad10527e2a308fa19bec7b144e9
2014-08-01 11:41:50 -07:00
Ray Chen 045aa05777 Add ACCOUNT_ID to ACCOUNT_COLUMNS and populate it with Email from
EmailProvider.

b/16400882

Change-Id: I2765fa6cea392e07b878fe063c7234582a485b1d
2014-07-22 11:31:37 +02:00
Ray Chen 7e75afadb1 com.android.mail.providers.Account contructors are no longer public
and clients need to use Account.builder().buildFrom(...) instead.

Change-Id: I7559540458ae549c399effc59392930ec914ffcc
2014-07-16 10:06:23 +02:00
Jay Shrauner 5c93d36616 Merge "Fix NPE in uiSaveDraftMessage" into ub-mail-master 2014-07-14 18:38:02 +00:00
Jay Shrauner bcc204dd6f Fix NPE in uiSaveDraftMessage
Verify that restoreMessageWithId returns a non-null result.

Bug:14655866
Change-Id: Ia48d5fd96a4314f4e10e9a8c3764ad52f2aa5eed
2014-07-14 10:51:00 -07:00
Martin Hibdon bb391e8018 Merge "Update IEmailService" into ub-mail-master 2014-07-14 17:08:38 +00:00
Tony Mantler 6cf6b5c292 Merge "Remove direct entry points to AccountSettings" into ub-mail-master 2014-07-14 16:02:26 +00:00
Martin Hibdon 7afbeee47e Update IEmailService
Add version support
Change deleteAccountPIMData to deleteExternalAccountPIMData.
Data kept inside the EmailProvider can be deleted from within
the Email app. Only external data (e.g. contacts and calendar)
need to be deleted by the service which has protocol specific
knowlege.

Change-Id: I875d3051d0cfdbaf52775ec20eb114a345894a93
2014-07-11 15:49:45 -07:00
Tony Mantler 8c03e2af9f Remove direct entry points to AccountSettings
b/16240332

Change-Id: I9bc3f9a2e0b7faa4d8875a9ac7d6d585a65d9733
2014-07-11 21:34:55 +00:00
James Lemieux f79ed0f54f Merge "Remove attachment previews from Conversation List" into ub-mail-master 2014-07-11 16:34:41 +00:00
Tony Mantler b7e0834121 Add support for UPDATE_SETTINGS_URI
b/16188467

Change-Id: I6a948292e4406e01d68ed5c961912c492367717d
2014-07-11 11:25:58 -07:00
James Lemieux a546307c1d Remove attachment previews from Conversation List
This includes:

- all references to the 3 attachment preview columns in the Gmail
conversation table (except for migration code in MailStoreInitializer)
- all layout and drawing code for attachment previews in conversation list
- all assets related to attachment previews
- all preference and analytics code that aided attachment previews

NOTE: This does not alter, in any way, the display of attachments in
conversation view.

Change-Id: Iccefd2fcf146ccdad927e7911900f370baaf8a1d
2014-07-10 16:56:11 -07:00
Tony Mantler 4fb5412e1b Switch to material icons for Email
b/15966080

Change-Id: I5d6097e37cb47356fc70a38e1aa2ae0c41e9ae7a
2014-07-08 15:55:40 -07:00
Tony Mantler e292027fa7 Pre-cache attachment content URIs
Saves us a DB read on the UI thread.

b/15939030

Change-Id: I1b8174880ccc9dc06df6b57df2bd8d44a2fe05d4
2014-06-30 10:24:12 -07:00
Tony Mantler 9a311806ca Merge "Change SENDING_UNAVAILABLE to VIRTUAL_ACCOUNT" into ub-mail-master 2014-06-26 17:57:04 +00:00
Tony Mantler c2b1056a61 Change SENDING_UNAVAILABLE to VIRTUAL_ACCOUNT
b/9566150

Change-Id: Ic8c009d2440eb2f4b2cd6343b50118b81d636fb6
2014-06-26 14:21:26 -07:00
Anthony Lee 3d16e5d4b9 Move over to the new AttachmentService.
Change-Id: I4a687b003884ea6a92a755fcbf394001bfc96a38
2014-06-25 09:56:29 -07:00
Tony Mantler 5f24f6f2e5 Merge "Return settings fragment class for account" into ub-mail-master 2014-06-23 21:44:43 +00:00
Tony Mantler 2eecdd1a50 Don't leak cursors
b/15830514

Change-Id: I91f452fc7c14a076d7f9078ec066215b28ddc3c3
2014-06-23 13:38:22 -07:00
Tony Mantler 876c8e1408 Return settings fragment class for account
b/9566150

Change-Id: Ia88f09d651284ff8f25a1784dc9a93ee30e6ea52
2014-06-20 14:32:15 -07:00
Paul Westbrook 4038f464de Enable supression of combined account
This enables the client of the provider to suppress the email combined
account.  Later, the UI can enable a combined account that spans all of
the account types

Change-Id: I77e201f751019240af2274a1f74e2124b9889aab
2014-06-20 00:09:07 -07:00
Tony Mantler c8d8a8445e Listen for relevant shared preferences changes
b/9566150

Change-Id: If6005de568330d12e2838220b815467d58276d71
2014-06-16 13:30:25 -07:00
Tony Mantler 988ad6e002 Move all general prefs values to UnifiedEmail
b/9566150

Change-Id: Id7058586c71c3c1cc4933dc28532a02df90c29bc
2014-06-12 16:23:52 -07:00
Alan Lau 8183be889f am 9773c96d: Return the order key in the conversation cursor.
* commit '9773c96d83f126b8418b192bcf46f939f44fdb44':
  Return the order key in the conversation cursor.
2014-06-12 17:11:50 +00:00
Alan Lau 9773c96d83 Return the order key in the conversation cursor.
For Email the order key is the message timestamp, Gmail sortMessageId.  The
order key is then used as the sort key for notificatin api, and because it is
stable, notification bridger can avoid bridging duplicate notifications and
reodering the email card bundle on the watch.

Bug 15563260

Change-Id: Ie68f45de91cc42c58238b7cdc0ae828048e22a46
2014-06-11 16:16:41 -07:00
Tony Mantler 51af59fc66 Remove unused preferences and dead code
Change-Id: Ica8bd735a91417ed44bd547ab7176832745d729e
2014-06-10 11:29:17 -07:00
Martin Hibdon 92a059ece4 Merge "Revert "Get rid of deleteAccountPIMData from IEmailService"" into ub-mail-master 2014-05-21 20:43:10 +00:00
Martin Hibdon c5f5a14ae9 Revert "Get rid of deleteAccountPIMData from IEmailService"
This reverts commit cf2178c4fa.

Change-Id: I9b05dd7a29a2d2edf64529ca28e2305737a43115
2014-05-21 20:41:37 +00:00
Martin Hibdon 9598c1e817 Merge "Get rid of deleteAccountPIMData from IEmailService" into ub-mail-master 2014-05-21 20:31:08 +00:00
Martin Hibdon cf2178c4fa Get rid of deleteAccountPIMData from IEmailService
This doesn't need to be part of the service because the
implementation doesn't need to be different between any
of the different protocols.

Change-Id: Ifddf16dd3ccaf397029f08f6d4283d9a5630f717
2014-05-21 12:18:29 -07:00
James Lemieux 837aba39d5 Sanitize HTML email bodies in Android Email
b/14567151

Sanitizes HTML email bodies on demand as they are requested from
EmailMessageCursor. Also alters Account settings to indicate that emails can be
assumed to be sanitized and transform scripts can be applied to the email
bodies.

Change-Id: I789e6de3569ae8c7d2c21f0b5aa590d7638a1467
2014-05-20 16:26:58 -07:00
Tony Mantler c1265d2090 Merge "Move email bodies to files" into ub-mail-master 2014-05-15 16:43:00 +00:00
James Lemieux b3db04b80b Stop EmailProvider from zealously and uselessly notifying of changes
EmailConversationCursor eagerly marks all messages in the current mailbox
as being seen. Most of the time it is a redundant operation, but nothing
prevents the provider from broadcasting notifications and all of the
observers from dutifully reacting to the notification. A good deal of
work is avoided now that we only notify when rows in our database have
actually been altered.

Change-Id: Ie91e6aebaf9c2899510f3818586d582073954d16
2014-05-14 15:38:35 -07:00
Tony Mantler 82a207132b Move account backup/restore to userdata in AccountManager
Change-Id: Iea9f2a1b1f2d87e07d63cbb1df5a0d6355ea4031
2014-05-14 15:15:49 -07:00
Tony Mantler 7525feb244 Move email bodies to files
Change-Id: Icfd0c4ab2ad25cc02b45cf41e7a205c17948ef2c
2014-05-14 13:27:49 -07:00
Tony Mantler e8a3c14f28 Fix URI comparison
b/14914981

The framework may make copies of the URI objects before they're passed in,
so we should use .equals() instead of pointer equality.

Change-Id: Ia443e96c81d53829ac6cfce70cebc098861f1c78
2014-05-14 11:32:20 -07:00
Tony Mantler 2f288864b6 Fetch email bodies using ContentResolver#openInputStream
This brings us further along the path to storing email bodies
outside of the database.

Change-Id: I96296114ade0d561df724878ed92999306bcd176
2014-05-08 15:50:57 -07:00
Tony Mantler 91e8e6f709 Null check EmailServiceInfo
b/14567915

Change-Id: I4780835a7f195f1a825a1538f9f1b939e2be4214
2014-05-05 13:59:39 -07:00
Tony Mantler 4db2d1cf74 Escape string values passed into SQL
b/14562987

Change-Id: Ibefd8d1d7418fffe4467abdae0cf978228d303a0
2014-05-05 10:51:44 -07:00
Tony Mantler f837c474a4 resolved conflicts for merge of 0d7c7091 to ub-mail-master
Change-Id: Id754089f16146daf0c07f77208d55c2406c997c5
2014-05-01 15:27:21 -07:00
Tony Mantler 0d7c709125 Always return a valid Uri for account inbox
Also don't return virtual folders unless real folders exist

b/14319452

Change-Id: Id5f62f5ccc4d5488ae467df741b0598a158ceb81
2014-05-01 15:05:15 -07:00
James Lemieux 8cfbfb50bb Inline images are not displayed for IMAP and POP emails
b/11998344

This solution covers these use cases:

1) Inline images in the Email app.
2) Inline images in .eml attachments in the Email and Gmail apps.

The solution here was to override shouldInterceptRequest(...) in
the WebViewClients and resolve any cid urls that are encountered
within the email body.

EmailProvider and EmlAttachmentProvider both gained the ability to
query for an Attachment object using a message ID and cid (which
is stored in the database column: contentId).

With this new query in place, it was straightforward to fetch the
Attachment in the WebViewClient and then obtain an InputStream to
the file that backs the Attachment to return back to the WebView.

Change-Id: I865a74fc291915c0d66a7492763a5f5682365b92
2014-04-22 11:29:19 -07:00
Andrew Sapperstein 592a85d97d am 1bb18931: Send PLID with message instead of conversation.
* commit '1bb18931e29dfe55a9b3368bd2393ac57c5fdebb':
  Send PLID with message instead of conversation.
2014-04-17 17:20:04 +00:00
Tony Mantler 9caaebb142 Bypass the cursor completely when passing message within EmailContent contexts
We should investigate using PFDs when passing to the UI layer too, for consistency

Change-Id: I21ad1987926b93af20287ae8e49bfc7a4ad99570
2014-04-16 16:49:29 -07:00
Andrew Sapperstein 1bb18931e2 Send PLID with message instead of conversation.
Fixes b/13748439. Sending with conversation required
server-side changes and wasn't actually more memory efficient.
Arguably it would be less efficient.

Change-Id: I8e1be03e183c65e169da5152a4763d5f80460bb9
2014-04-16 11:48:59 -07:00
Tony Mantler f678a18b69 Bypass the cursor window for email bodies
b/11787468

Change-Id: Iba5faa5b825357144d07ec4dfcf010c6af50496d
2014-04-15 15:18:17 -07:00
Tony Mantler 3dd85723a1 Cleanup in EmailContent
Change-Id: Ifa251eb206779f59ea003f99395d454c7e407bc2
2014-04-14 12:54:39 -07:00
Tony Mantler e8c4c22268 Enable Empty Trash in Email
Add markContentsSeen() and emptyFolder() to EmailConversationCursor.
Add 'purge folder' URI for delete() call in EmailProvider.

Change-Id: I2f65f877f8f4e8376eb5c2149b5051931c2ac083
2014-04-10 12:06:43 -07:00
Tony Mantler 0053401d07 Move EmailConversationCursor out of EmailProvider
Also tidy warnings in EmailProvider

Change-Id: Ib41011cc4b43adf0272be22bc7c054a99ff58309
2014-04-09 14:20:08 -07:00