summaryrefslogtreecommitdiff
path: root/tests/src/com/android/email/ControllerProviderOpsTests.java
Commit message (Collapse)AuthorAgeFilesLines
* Disable, suppress, remove broken and obsolete Email testsJerry Xie2013-12-161-7/+2
| | | | Change-Id: Ia4dcba1c6966f23dd2a15e69324b7345aed8f944
* Get Email units to compileJerry Xie2013-12-051-452/+24
| | | | Change-Id: I171a0e2421c5006d9862ad94f886932146547020
* Remove references to account mailbox.Yu Ping Hu2013-06-171-5/+0
| | | | | | Exchange implementation no longer uses them. Change-Id: I221a914f2428c0c7989f79392ca82f7a8f4b1c52
* Revert to old Email appMarc Blank2012-04-251-2/+45
| | | | | | * These are the last sources in the ICS-MR1 tree Change-Id: Ida4651bddd92a06a518d00f3e1f275ab3a80c8ae
* Move account delete logic to EmailProviderMarc Blank2012-03-091-1/+2
| | | | | | * This functionality had to move away from Controller Change-Id: I557918a325eab8c83a9728fa1ce33dde8b86158f
* Convert POP3 to serviceMarc Blank2012-02-161-44/+0
| | | | | | * Remove MessagingController and (almost all of) MailService Change-Id: I8953b58b237de6a71fda770f1727bd94081fec55
* Remove illegal references to IsolatedContextBen Komalo2011-07-201-9/+0
| | | | | | | | | This fixes a crash on account deletion, leaving around bad accounts that were in limbo Also remove a test for an unsupported operation Bug: 5051951 Change-Id: Ieebc7f769075614ae1a656cf123d8ce0313e611d
* Build default mailboxes for POP3Ben Komalo2011-07-171-11/+11
| | | | | Bug: 4580535 Change-Id: Ic800eed387d3e9e64e95cce691d13d98b4a48045
* Handle message sets in a single EmailAsyncTaskMarc Blank2011-07-161-4/+4
| | | | | | | * This prevents the possibility of RejectedExecutionException when selecting large numbers of items Change-Id: I8f9ba287d69021fdb99b4a8a30cc79755f669b97
* Improve EmailContent caching...Marc Blank2011-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Guarantee that up to 16 Account (with HostAuths), and Policy rows are always cached. Also, 6 commonly used Mailboxes per Account (Inbox, Outbox, Drafts, Sent, Trash, and Search) * Precache these rows when EmailProvider starts up * Ensure that newly added, precachable rows are cached when created * Clean up some inefficient/wrong caching code * Fix a commonly called method in NotificationManager in which we load a single Mailbox row using selection vs withAppendedId * Confirm that we don't read from the database in typical use and heavy message loading * Add a special URI for finding mailbox by type (using the cache) * Add special-case code for EmailContent.count(Account.CONTENT_URI) which is used in a number of places (including on the UI thread) and whose value is easily determined * Add a special URI to get the default account id * Confirm that all unit tests work The goal here is to be able to load all Account, HostAuth, Policy, and Mailbox objects (by id) without worrying about disk access. There will still be a single disk read for uncommon Mailbox reads, but this should be considered acceptable. Change-Id: Ibc9aa7acc73185e360b0b6f3053b90a985e97210 TODO: Unit tests
* Move Account into its own top-level classMarc Blank2011-06-131-1/+1
| | | | Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
* Set proper default values for new mailboxesTodd Kennedy2011-06-091-11/+35
| | | | | | | | | | | | | | When creating mailboxes (specifically 'drafts' or 'sent'), we need to ensure that its default values for flags & server key are set correctly. In most cases this is "okay" because the mailbox will be created on the server and the values for these fields will be reset. However, in cases where system mailboxes cannot be created on the sever (for example, the 'drafts' folder on any POP3 account or an IMAP gmail account), these default values do not get updated and we are unable to view the contents of these mailboxes. bug 4356871 Change-Id: I9e6a394145f471b555c5827d5114bca243dbc37c
* Add Controller.deleteMessages(long[]) for batch deleteMakoto Onuki2011-05-251-20/+6
| | | | | | | | | | | - Also removed the accoundId parameter, which wasn't used. - Also cleaned up MailboxListFragment.onDrop. (the restored Message was only used to get the account id, but it's no longer needed.) Bug 4384642 Change-Id: I8f6635011dae0529a82972617101e1c130090b76
* Move HostAuth to top level class.Ben Komalo2011-05-191-1/+1
| | | | | | No other changes made. Change-Id: I1c6497c98abc0f99443ea42d8aed6295b263c123
* Move Mailbox to top level class.Ben Komalo2011-05-131-5/+5
| | | | | | No other changes made. Change-Id: I3d8f3c521dc0d902be313b25252b4b6a4a96e7ee
* Fixes to MessageCompose saving.Ben Komalo2011-05-031-2/+1
| | | | | | | | | - "save draft" no longer closes the message - ensure consistent state if there are successive saves - misc changes to the way a message is loaded if there is a pending save Bug: 3072398 Change-Id: I9cd01319772293e4d410020ab27603821a95ec9f
* Opportunistic cleanupTodd Kennedy2011-04-271-3/+4
| | | | | | | | | not making any real code changes: * removed deprecated, unused methods * remove 'throws' clauses when that exception is never thrown * renamed method Controller#moveMessage()-->moveMessages() Change-Id: Ifd006f760f0c19283e94a11a45c71295c8da35f7
* Email split, part huit: Refactor constants, clean emailcommonMarc Blank2011-02-141-1/+1
| | | | | | | | | | | | | | | * There are three pieces to this CL (sorry): 1) Move and/or rename some constants into emailcommon 2) Move Utility to emailcommon, moving the few UI related utilities back into Email (FolderProperties and UiUtilities) 3) Remove all references to resources from emailcommon * The three pieces relate in that, between them, they allow the emailcommon static library to compile cleanly Bug: 3442973 Change-Id: Ic5e3abaa2a1b36999e0b6653c6c2134ea1bd544f
* Email split, part six: EmailContentMarc Blank2011-02-101-6/+6
| | | | | | * Moved EmailContent to emailcommon Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
* Fix issues w/ security-related account data deletionMarc Blank2011-01-091-7/+10
| | | | | | | | | | | * Stop running syncs * Delete all EmailProvider data except the account itself (with cleared sync key) and the account mailbox (necessary for syncing to sync after security hold is lifted Bug: 3245779 Bug: 3253952 Change-Id: Idc208ef5ed85808b085ebab9c26a428fb0451e34
* Async code for read/unread and starredAndy Stadler2010-12-231-13/+16
| | | | | | | | | * Move each worker into async (combining common code) * Update unit tests to match * Make the message->account->controller lookups more efficient Bug: 3134653 Change-Id: Icc82998a5d8eb07c7ebc7edbd28cd9308378d866
* Leave empty inbox when clearing out account.Andy Stadler2010-12-011-8/+24
| | | | | | | | | | * Makes things simpler for UI state on a wiped account * Also wipe sync keys from remaining account & inbox * Unit tests Bug: 3245274 Bug: 3245779 Change-Id: I74cc6d7859dad54961426b70ffe0541ce49e3b91
* Cleanups to Controller & AttachmentProviderAndy Stadler2010-11-301-0/+53
| | | | | | | | | | | | * New method in AttachmentProvider to delete all attachments for an account, and unit test it. * New method in Controller to delete all synced data for an account, and unit test it. * Fixed existing problem with Controller unit tests (needed cache clear) * Fixed existing problems in Controller (mContext vs. mProviderContext) Bug: 3197935 Change-Id: I79c6a03c21f18d37eeb8158cd1c2af0e0a6e9d2e
* Don't move drafts to trashMakoto Onuki2010-10-191-26/+61
| | | | | | | | | | | | Now deleted drafts are really deleted, rather than getting moved to trash. Also rewrote the test to avoid creating AsyncTasks on the test thread. In this case it seems to be running fine, but I've had problems doing this before. Bug 3099179 Change-Id: Ice5298bf94312ce764d90aa35c5a6c5262ec5b42
* "Move to" multiple messagesMakoto Onuki2010-09-011-4/+11
| | | | | | Now Controller.moveMessage supports moving multiple messages. Change-Id: I5d9715cd94e55cf14254b4d4d731524be9d014a8
* IMAP implementation of "move to folder"Marc Blank2010-08-261-7/+40
| | | | | | | | * Clean up Controller.deleteMessage to work with new EmailContent utility methods, and move out of the UI thread * Add unit test for Controller.moveMessage Change-Id: Ic49e2ecc7ef2252dd4d51f4c3b313b936fda78b6
* Revert "Convert Controller to a full service"Marc Blank2010-08-241-3/+3
| | | | | | This reverts commit 0e6d972641c19467d6b26351ce14a3f44c9fd6f4. Change-Id: I005fc34152396806468edef919a3620961ddb4fe
* Convert Controller to a full serviceMarc Blank2010-08-201-3/+3
| | | | Change-Id: I2078fd047ff46f85936c8bf798a5edd3678bb5b4
* Properly unregister mock controllersMakoto Onuki2010-08-131-70/+54
| | | | | | | | | | | | Some tests create mock controllers. They register themselves to MessagingController when instantiated, but never unregister. Added a cleanup method, and call it for each instance. (I was hoping it would spped up unit tests, but it didn't. Still it's a nice thing to do.) Change-Id: Ia90f0380aef388d22f7cfcf6e9203e05444b3285
* Split up MessageViewFragment like we did to MessageView.Makoto Onuki2010-07-301-14/+10
| | | | | | | | | | | | | | | | | | | | | Break MessageViewFragment up into two fragments, MessageViewFragment, which is used to show regular messages, and MessageFileViewFragment, which shows EML messages. (And their base class, MessageViewFragmentBase.) MessageViewFragmentBase's javadoc has a class diagram. MessageViewFragment is actually named MessageViewFragment2 at this point so that GIT correctly finds out the rename from MessageViewFragment to MessageViewFragmentBase. I'll rename it back in a following CL. Also added very basic unit tests for MessageView and MessageFileView. At this point, they just make sure the activities really open and show messages without exceptions. I feel like the current naming schema for the activities/fragments is kinda confusing. Let me know if you come up with better names. Change-Id: Iff948f4b68cfdb7c1e68f225927b0ce58d34766b
* Cleanup and speed up isMessagingControllerMarc Blank2010-06-281-2/+47
| | | | | | | | | | * Use the new Account.getProtocol() method to determine whether an Account "isMessagingController" (i.e. uses the legacy controller) * Cache the result of this test, so that it's only done once per Account * Add unit test Change-Id: I6a0ec789a84bdf30b55156e6337a627fb4e81a08
* Handle viewing of attachments that are, themselves, emailsMarc Blank2010-06-221-0/+64
| | | | | | | | | | | | | * Add intent filter for application/eml and message/rfc822 mime types, launching MessageView with a Uri * Modify loadMessageTask to handle the Uri by parsing the attachment's input stream with Pop3Message.parse(), and then creating an EmailProvider message in a special Mailbox created to hold "attachment" messages * Delete all "attachment" messages after the parent message is closed * Add unit tests Change-Id: I20276ee006b9f05b889f3c808d3dc407cde26d49
* Cleanup imports.Makoto Onuki2010-05-071-1/+0
| | | | | | (Note it's for froyo-plus-asop) Change-Id: Ia5b771cd41099ab486ba2e556b441fc7c0affe5f
* Clean out old mailbox names logic and fix a couple of bugs.Andrew Stadler2009-09-211-7/+35
| | | | | | | | | | | | | | | * Get rid of old Account.getxxxFolderName() calls. * Clean up any call sites to them * Properly rename the existing special folder name identifiers * Use a hash table in MessagingController to improve identification of special folders for IMAP accounts * Fix a bug in Controller, which was creating new server-side folders using localized names. * Fix a bunch of code in Controller that was using mContext, instead of using mProviderContext to support testability. * Fix broken unit tests in ControllerProviderOpsTests Fixes bug 1904373
* Moving message operations into Controller, and load attachments.Andrew Stadler2009-07-231-0/+56
| | | | | | | | | | | | | | | | | | | * Moved logic into Controller: * toggling read/unread * toggling favorite status * some new unit tests * load attachment * Completed logic for EAS to save attachments and MessageView to begin and complete that process. NOTE: Until EAS has a mode for saving the attachment locally (and I rewrite the attachmentprovider to handle the new database) I am implementing "view" attachment to just call "save". This means that attachments "viewed" will be dropped onto the SD card, instead of cached and flushed. TODO: Controller is not properly working in its own thread, yet, so we are not properly preventing ANR's yet.
* First steps towards using the new EmailContent.Message in MessageCompose.Mihai Preda2009-07-151-0/+62
|
* Reenable delete-message UI and write delete-from-provider.Andrew Stadler2009-07-061-0/+147
* Longpress delete in MessageList * Delete or Menu-Delete in MessageView * Add deleteMessage() to Controller * Unit tests for the new code in Controller