Commit Graph

31 Commits

Author SHA1 Message Date
Marc Blank 3a5c1fb274 Email split, part neuf: Setup, logging, attachment glue
* Make "Exchange" option in account setup depend upon availability of the
  Exchange EmailService
* Make presence of Exchange logging depend upon availability of the
  Exchange EmailService
* Make AttachmentDownloadService use service rather than ExchangeService
  class
* Move SSLUtils to emailcommon/utility
* Move account manager type defs to emailcommon/AccountManagerTypes
* Update proguard.flags
* This is the penultimate CL for the Email package itself; the next CL
  creates a clean, SDK-compatible Email application

Bug: 3442973
Change-Id: I9162cf5fa6b5a043ded0fdd1e25fd3ce5948ad8f
2011-02-14 16:08:55 -08:00
Marc Blank 31d9acbf06 Email split, part huit: Refactor constants, clean emailcommon
* 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
2011-02-14 12:18:10 -08:00
Marc Blank a7bc0319a7 Email split, part six: EmailContent
* Moved EmailContent to emailcommon

Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
2011-02-10 19:44:29 -08:00
Marc Blank 2193962ca2 Email split, part quatre: Move along, nothing to see here
* 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
2011-02-10 16:28:37 -08:00
Marc Blank 0d4fc55861 Email split, part one: EmailService
* Create emailcommon package
* Move EmailService classes to emailcommon package
* Change references to aidl's to emailcommon package
* Add getApiLevel() command to EmailService

Bug: 3442973

Change-Id: Ic7d2115363cdff6ebb86c46650b0a5b2109b1c72
2011-02-10 13:10:38 -08:00
Marc Blank 64b64cca01 Rename SyncManager to ExchangeService
* Updated comments and checked for 100-columns

Change-Id: I4ab5aaa9425714f8e035e1952db3fec63d498ae1
2010-08-27 12:15:56 -07:00
Marc Blank 09fd4d0a18 New asynchronous attachment loading code
* Create AttachmentDownloadService to manage all attachment downloads
  1) User requested
  2) Required for email forwarding
  3) Opportunistic downloads to enhance offline use
* New attachment related UI (pending UX approval, of course)
  1) MessageView (attachment actions, progress bar, etc.)
  2) MessageCompose (attachments for forwarded messages)
  3) Associated toasts, notifications, etc.

TODO:
* Unit tests
* Cache Management (separate CL)

Change-Id: I7864a5fb1c3f4f2be68d98341a971edc6cbacfe1
2010-08-19 14:01:08 -07:00
Marc Blank 5b02ecf87c Fix SmartReply/SmartForward in EAS 2.5
* We inadvertently broke this with a recent update that uses Uri
  encoding for ItemId and CollectionId in SmartForward/Reply commands.
  We need to allow colon (:) however for EAS 2.5; otherwise, sends
  fail with HTTP 500
* Update unit test

Bug: 2821684
Change-Id: Ia6bdd2169513d1c13a8174dd599477a35df950f2
2010-07-07 14:42:31 -07:00
Marc Blank 51f5b2f3fa Fix problem with unencoded data in URI sent to EAS
* We need to encode the itemId and collectionId for SmartForward and
  SmartReply
* Add unit test for the fix
* Small change + test to EasSyncService usage of URI encoding to use
  a non-deprecated method

Bug: 2787725
Change-Id: I428b308b56cc359b8cdd9e42bc3f42c65b6797dc
2010-06-28 21:25:53 -07:00
Marc Blank 18d7222359 Send meeting invitations for new/updated Exchange events
* Wrote utility to create an ics file (iCalendar) based on a
  CalendarProvider Event.  This is a good first pass, but we need
  to consider whether to include alarms, etc.
* Use aforementioned utility and new convenience method to send
  meeting invitations to attendees of newly created meetings (events)
  when they are uploaded to the server via the CalendarSyncAdapter
* Overall, attempted to modify existing provider and rfc822 output
  code as little as possible.  Rfc822Output is actually very limited
  in its capabilities and should be made more robust in future

Change-Id: Ie20b9137df56dc414de6737d05fa40ec9cdf47e0
2010-02-23 11:37:18 -08:00
Makoto Onuki bb9b5163c1 Move non-exchange specific classes to com.android.email.service. 2010-01-29 10:37:39 -08:00
Marc Blank caf5644360 Fix delay sending stuck mail after tapping "Send outgoing mail"
* Fixes #2317429
* When "Send outgoing messages" is tapped in Outbox MessageList view,
  we clear the error state for all "stuck" messages
* We didn't, however, clear the error state of the Mailbox, which doesn't
  clear itself until the end of a pingLoop, which can be up to 30 minutes
* The fix is in two parts:
  * We clear the error state of the Outbox when a sync is requested by
    the UI
  * We don't set the error state of the mailbox for non-auth errors when
    sending, because we don't want to block OTHER messages from getting sent.

Change-Id: I768138b6f31eb696811aa94f621b6fa758ec1a5e
2009-12-11 10:07:17 -08:00
Marc Blank 4b59cfc8ed Fix problem with timeouts and sending attachments (#2178288)
* Standard Exchange command timeouts are 20 seconds
* For sending, however, these need to be significantly longer to
  handle the case of sending large attachments, as sending (of any
  length) happens in a single HTTP Post command
* Having an infinite timeout leads to the (small) possibility of the
  Outbox hanging for a long time, holding up the sending of other
  mail, so we set a long, but not infinite timeout for this case
* Timeout now set for 15 minutes
* Prevent sync of Outbox and Drafts (the UI triggers these by changing
  the contents of these boxes, but we need to ignore the pings that
  are generated this way)

Change-Id: I5b830d6b4e94525d95138b2112be12898a37882e
2009-10-09 11:20:52 -07:00
Marc Blank 3e1c871f04 Fix EAS sending, which was inadvertently broken by a change in EmailProvider
* syncServerId in the Message table can now be NULL; this broke a test
  used by EasOutboxService and SyncManager to determine whether there
  were sendable messages in the Outbox
* Changed test to allow for NULL in syncServerId

Change-Id: Id76c7a45bc306abe7a927ab2395700f54a01a298
2009-09-23 10:52:00 -07:00
Marc Blank 7e89834cfd Fix problem w/ SmartReply & SmartForward in Exchange 2003
* It doesn't like URLEncoded commands; go figure!
* Fixes #2127892

Change-Id: Ibae8cad990ed45accb6699716fda56f45c850939
2009-09-17 15:50:52 -07:00
Marc Blank 0d1f7add7d Add logging to EasOutboxService to help find sending issues
Change-Id: I8188fd2977724ae4ee6a8703098b7068c14b92fd
2009-09-17 15:20:00 -07:00
Marc Blank 2d5691cac1 Support bcc in Exchange (Fixes #2117849)
* Must send the bcc header for EAS

Change-Id: I38d119beed334c6bb23a09b87375804f8c03ea76
2009-09-15 15:18:46 -07:00
Marc Blank 1d98989222 Implement SmartReply/SmartForward for EAS; fixes #2098779
* SmartForward and SmartReply are EAS commands that automatically
  include the original message and, if a forward, all original
  attachments, regardless of whether they've been downloaded to
  the device
* Both commands improve battery life by sending less data; greatly
  so for SmartForward if there are attachments

Change-Id: I12432cd5275a3b54e9a80d5cd59da437c4a086cc
2009-09-14 15:47:38 -07:00
Marc Blank 9178dcc9e9 Fix bugs re: sending via EAS
* Make sure each call to sendMessage returns a proper result code
* Exit outbox sync on irrecoverable errors
2009-08-20 12:05:57 -07:00
Marc Blank d366346a64 Implement sendMessageStatus callback in EAS
* Change API for callback to include message subject (when msg is isn't valid)
* Update users of callback to add the new argument
* Use API in EasOutboxService to send status messages back to the UI

Still TODO:  Add relevant error codes for sending problems that are not related
to connection or login issues
2009-08-20 09:08:12 -07:00
Marc Blank f4d7ddb0c2 Fix message sending from EAS (the service wasn't properly set up)
* Cleanup of EasSyncService
2009-08-19 16:09:26 -07:00
Marc Blank 6b52af214c Implement adaptive ping timeout; release wake lock waiting for connectivity
* Remove unused/duplicated classes (e.g. Base64, WbxmlSerializer, etc.)
* Code cleanup in AbstractSyncService, EasSyncService
* Remove last references to HttpURLConnection (using HttpClient now)
2009-08-16 16:40:42 -07:00
Marc Blank 1ba0fd37a1 Cleanup; delete unused files, change log statements
* Two files were unused and therefore deleted
* userLog was changed to avoid using string concatentation until the logging
  decision is made
2009-08-13 11:30:39 -07:00
Andrew Stadler c640cbbaf3 Update SMTP to send from provider messages, and attachments
* Change Sender definition (remove old Message from API) and update
    any existing calls through that API
* Rewrite SMTPSender to use provider messages
* Add attachments to RFC822Output
* Minor bugfixes in RFC822Output
* Unit tests
2009-08-13 09:31:57 -07:00
Marc Blank b37b1b4bfe Stream rfc822 messages to a temporary file, and send using an InputStreamEntity
* Removes the need to store the entire outgoing message in memory
2009-08-12 15:35:44 -07:00
Marc Blank 4f195e716c Use new Rfc822Output class for sending mail; fix bug in Rfc822Output
* Change EasOutboxService to use the new Rfc822Output class for sending
* Fix small bug in Rfc822Output (was writing both in Base64 and plain text)
* Fix bug in SyncManager related to auto-starting EAS outbox
2009-08-11 20:07:42 -07:00
Marc Blank 1e7829fb65 Switch from HttpURLConnection to HttpClient 2009-08-08 13:33:41 -07:00
Marc Blank f00dccd321 Massive reworking of EAS serialization; much smaller and faster now
* Remove all use of Strings in favor of the parser's static final int's
* Strings remain in Tags for debugging output only
* Renamed lots of classes to be more consistent
* Centralized logging behavior in Eas class
* Found and fixed some bugs in the process:
  - Account deletion wasn't removing HostAuth's correctly in the trigger
  - Adding a second EAS account was trashing the first one
  - Fixed looping sync behavior caused by Exchange 2003 bug
2009-08-01 17:55:15 -07:00
Marc Blank b6493a07ef Major refactor and cleanup of EAS code
* Rewrote push logic to encompass multiple folders (i.e. calendar/contacts)
    * Change inbox from push frequency to ping frequency after initial sync
    * Implement upsync logic for email (i.e. sending changes to the server)
    * Did cleanup of some files (there's still some to do) re: format, style
    * Initial one-way sync of Contacts data - add and delete are implemented
    * Created adapter package for all parts of the EAS adapter
    * Created utility package for utility code that will eventually be merged
      with code in the Email application (Base64, QuotedPrintable, etc.)
    * SyncManager/AbstractSyncService can be used in the future for other
      protocols, especially IMAP push
2009-07-07 00:30:24 -07:00
Marc Blank 09d13e6295 Clean up Exchange code
Clean up imports to point to the com.android.exchange version of EmailContent
Clean up some line wrapping
Update EmailContent with latest version from Email project
2009-06-23 17:59:27 -07:00
Marc Blank 2c67f1f8b8 Initial submission for EAS support (email)
* There is some temporary code ensuring that SyncManager runs (this will be removed when Exchange
is entirely independent)
* The service interface (aidl) is in place for most user-facing actions (load more, start sync, etc.)
* EAS account validation is done via aidl
* Folder and message sync appear to be functional in this early submission
* Provider now does cascading deletes (Account -> HostAuth and Mailbox, Mailbox -> Message,
  Message -> Attachment and Body)
2009-06-23 13:13:42 -07:00