* No code was harmed, er, changed in the making of this CL
* All that's happened is that code that is needed by both Email and
Exchange have been moved into emailcommon
* This required import changes to many files, which explains the
length of the CL
Change-Id: I4e12455ba057a4a8054fdbd0b578c73afa411c8a
* Create AccountService.aidl and AccountServiceProxy in emailcommon
* Implement AccountService in email
* Use AccountServiceProxy in Exchange for account reconciliation,
notifications, etc.
* Move sync window constants into emailcommon
* Split attachment provider utilities and constants into emailcommon
Bug: 3442973
Change-Id: I89dce28b799b193243c07774dab65d830ae62775
* Remove LocalStore (pre-2.0 mail database) and its unit test
* Remove UpgradeAccounts (converted pre-2.0 accounts to Provider)
* Remove FolderMessageList (receiver for pre-1.6 desktop shortcuts)
* Remove "upgrading" paths through LegacyConversions
* Clip out dangling references to everything above
Bug: 3292310
Change-Id: I5654d55a0879b00b05b63055b94651855a8ee3ef
* Check content-disposition and restrict to these two types
* Add unit test
* Reformatting collectParts (code style cleanup)
Bug: 3242502
Change-Id: I5dcbdda5d4788502113771f4fd1b5fff834a402d
* Load attachments in the background for IMAP/EAS messages
* Download an attachment from account X if:
1) 25% of total storage free
2) Attachments for X use < 1/N of 25% of total storage, where N is
the number of AccountManager accounts
* Add accountKey to Attachment table for performance
Change-Id: I913aa710f34f48fcc4210ddf77393ab38323fe59
* In this CL, we cache individual rows, based on the CONTENT_PROJECTION
defined for the most common queries (Account, HostAuth, Mailbox, and
Message)
* Queries on individual rows (most often Class.restoreClassById()) will
look to the cache first, rather than querying the database
* Queries on smaller projections will build MatrixCursor's from cached
data
* Write-through caching updates the cache with changed columns
* Experiments with live data indicate that > 95% of queries that are
cacheable (single row, no selection) can be retrieved from the cache,
thereby saving a great deal of disk access.
* Timing experiments show that cache hits are > 40x faster than cache
misses
* Unit tests for the various classes exist, with more coming
TODO
----
* More unit tests
Change-Id: I386a948a2f4cc02b6548d07d9b2fefd1e018a262
* Add "vibrate when silent" choice in UI
* Add storage for it in Email's provider. Existing accounts default to
their current settings (always vibrate / never vibrate).
* Respect new mode when notifications are posted
* Updated existing unit tests
Bug: 2457183
Change-Id: I5c933ac39dbef8b2028255f330e0b084a445421a
* Most clients send name= in the content-type, but a few clients
send only filename= in content-disposition.
* There was code to handle both cases, but due to two typos, it didn't
work.
* Most easily reproduced by sending from hotmail/live web client.
Bug: 2366961
Change-Id: I1d9a00b9b5fd1094cfb8566c3248d94286a8ae91
* Split account copy loop to do POP3 accounts first, then IMAP
* After upgrading accounts, upgrade folders
* Upgrade messages in those folders
* Preserve attachments on outgoing messages (e.g. drafts)
* Enable composer and start syncing after upgrade
* Fix latent bug in LocalStore (which was not used in Eclair)
* Add tests for upgrade workers in LegacyConversions
Bug: 2065528
* Upgrade accounts table to add security column
* Read/Write new column
* Backup/Restore new column
* Unit tests for all of the above
* First cut at defining bitfields (non-binding, just putting down ideas)
Bug: 2387961
* Followup to 5e91cccd
* Workaround for (HTC bug: 2275383) & (Moto bug: 2226582)
* Restores mSyncKey as null instead of empty string, which is how
a new account is initialized. Bug: 2385980
* Cleanup synchronized logic in backup & restore
* Minor cleanups & improved comments
* Workaround for (HTC bug 2275383) & (Moto bug 2226582)
* Adds checkpoints for backing up and restoring accounts
* Uses legacy Account / prefs to back up accounts - this is because
some of this code will be reused for legacy account migration
* Unit tests of Account & LegacyConversions
* Unit tests of backup & restore
* Not done: testing of EAS/Account Manager interface (this will require
deeper dependency injection, to avoid the embedded calls to the Account
Manager and other system services.)
* For each attachment we add, check the DB for an existing attachment
with similar metadata (name, mime type, content id, etc.)
* Skip adding them if already held
* Unit tests
Fixes bug http://b/2084704
Some IMAP servers return NIL if you BODY.PEEK[TEXT] a messsage with
no body, instead of the more canonical {0}CRLF. Instead of messing with the
parser to deal with that, it makes more sense not to try and fetch empty
bodies. So there are three changes:
* Don't fetch parts when size = 0
* Don't append "null" when there is null body text
* Slight change to attachment handling so size is reported >0
* Unit tests on some of the related lower-level protocol stuff
Bug http://b/issue?id=2160387
Change-Id: Ifb8fb0ed5ce7297908e1ae8d5a02dda5975c4a3c
* MessageCompose now adds message-id to new messages (it was previously
done on its behalf by MimeMessage).
* LegacyConversions.updateMessageFields() now handles missing message-id
without error.
* Unit tests for the LegacyConversions change
These two issues were combining with a failure of comcast's SMTP server
to insert message-id headers, to prevent delivery of a message between
any two comcast accounts using this client.
Bug # http://b/issue?id=2161478
* Create logic to detect upsyncable messages in Sent
* Note: Drafts is now local only for IMAP - no sync, either way
* Rewrite MessageController.processPendingAppend for Provider world
* Write provider message -> legacy message converter
* Fixed bug in IMAP APPEND (it was not picking the right UID for the
uploaded message.)
* Better handling of server internaldate
* Add constants for new X-Android-Body-Quoted-Part header
* Add EmailContent routines to get each of the 5 parts of the body
* Remove "Load more" from unsynced message lists
* Add toString to MimeHeader for debug support
Bug # 2097471
TODO (next CL): Upload attachments records too
Change-Id: I209182f5adc6b6696919f559e3cbbdd58b3eed3a
IMAP messages up to about 25k will be downloaded properly.
* Move Store->Provider message rewrite code to a separate utility.
* Add code to descend a Store message and write provider attachments.
* Unit test basic IMAP attachment handler
TODO:
* handle large IMAP messages.
* unit test for POP
* unit test for large IMAP messages