Commit Graph

21 Commits

Author SHA1 Message Date
Makoto Onuki 91237e9dcb Adding script for building Email app without exchange.
remove-exchange-support.sh makes it possible to build the email app without
exchange support.

This script:
- removes all packages under com.android.exchange.
- removes all lines surrounded by EXCHANGE-REMOVE-SECTION-START and
  EXCHANGE-REMOVE-SECTION-END

And the resulting source should still build and run fine.

Bug: 2369784
2010-02-03 11:39:46 -08:00
Makoto Onuki 9fe51f6329 Gather common exchange related methods into one place
So that it'll be easier to remove exchange dependency.
2010-02-02 13:36:45 -08:00
Makoto Onuki faed6178b1 Move Eas.ACCOUNT_MANAGER_TYPE out of the package.
Moved Eas.ACCOUNT_MANAGER_TYPE to Email.EXCHANGE_ACCOUNT_MANAGER_TYPE.

This constant is not related to the exchange protocol, and referred in
a lot of different places.  Moving it out of the package will make it a lot
simpler when removing exchange dependency.
2010-02-01 15:38:15 -08:00
Marc Blank f3fcb8929e Implement Exchange calendar sync support
What should be working:
* Events sync down from server and appear in calendar
* Recurrences and exceptions appear in calendar
* Changed events on server should be reflected in calendar
* Deletions on server should be reflected in calendar
* Push of new/changed/deleted events should work
* Changes on device are NOT synced back to server
* New, single events on device are synced back to server
  (no time zone, attendee, or recurrence support)
* Checkbox for syncing calendar added to setup flow
* System sync glue in manifest, etc.
* Bugs are to be expected
* A few unit tests; needs more

Change-Id: I7ca262eaba562ccb9d1af5b0cd948c6bac30e5dd
2010-01-28 09:18:48 -08:00
Andrew Stadler 5e91cccd4b Quick backup/restore of accounts
* 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.)
2010-01-20 01:36:01 -08:00
Marc Blank 17da1767e3 Implement Autodiscover for Exchange servers
* Autodiscover allows complete configuration using only email address
  and password
* Code handles the two standard autodiscover addresses and redirect
* Autodiscover process starts when the user chooses "Exchange" as the
  account type.  If the account is created via the AccountManager,
  autodiscover begins upon tapping "Next" for the first time
* If autodiscover fails due to anything other than auth failure for
  autodiscover-capable servers, the user is placed into the standard manual
  configuration screen

Bug: 2366019
Change-Id: I936712b924833d9a133e8da04e11c3ba45d92f92
2010-01-13 17:11:49 -08:00
Andrew Stadler e4a7cc440f Re-enable modernized version of "optional" SSL/TLS
* Add "Accept all certificates" modes to incoming/outgoing secure choices
* Change URI scheme slightly to make "trust" a flag, not part of the
    protocol.
* Change Stores to know about new URI scheme
* Slightly rework Transport API to make "trust" an independent flag
* Adapt HostAuth to handle new Uri scheme
* Remove the old ambiguous "optional" code, which was allowing
    some unsigned certificates, but was *also* allowing TLS to
    optionally start (though not SSL, despite the UI strings.)
* Add a few unit tests to EmailContent
* Add logging and a bunch of comments to TrustManagerFactory, and a bit
    of simple cleanup to make it more readable.
* Add missing conversion of SSLException->CertificateValidationException
    in TLS so we get the correct certificate errors from TLS too.
* Re-enable TLS for mac.com accounts (which had a certificate problem)

Fixes bug http://b/2119755, http://b/1374780, and probably a raft of
earlier and/or external bugs about certificate problems.

Change-Id: Iaf99a8da3eaadaa4cdeec224737838b5d6813e55
2009-09-29 15:28:43 -07:00
Marc Blank 657de3bfd6 Revert change to AccountManager naming; use email address again
* Forces wipe of existing accounts

Change-Id: I65d08e07a2d74f94f9142e85791d9bf49c100241
2009-09-18 20:48:43 -07:00
Marc Blank e7e1ca432e Change AccountManager username for Exchange to the user's login credential
* This is not a backward-compatible change (sorry)
* Existing AccountManager EAS accounts and contacts are deleted
* Existing EmailProvider data is deleted
* Change works with new code (stadler) to avoid account duplication

Change-Id: Ife09c51fa714d91054d017b497bce603add5375a
2009-09-17 10:06:27 -07:00
Marc Blank cef2344e70 Rework EAS account creation & ssl operation
* Fixes 2048663, 2025029, and 2100131
* Add "Trust Certificates" checkbox in EAS account creation
* Use custom ClientConnectionManager for HttpClient with registry
  for plain, ssl, and tssl (trusted ssl) connection
* Use a ConnectionPool for HttpClient connections
* Remove "Domain" checkbox in  EAS account creation
* Remove tests related to the "Domain" field
* TODO Write a test for valid usernames (requires a bit of research)
  <name>, <email address>, <domain>/<name, and <domain>\<name> are all
  valid, but there might be others

Change-Id: I4a0338df5960bfd3d679a88aaf22d1c49f49992b
2009-09-09 10:32:06 -07:00
Andrew Stadler 91a5cd517f Clean up handling of Exchange setup option
* Use concrete declarations, not the old sample code
* Remove unused "sample" code
* Create ExchangeSender.java
* Strip out the unused (old sample code) parts of ExchangeStore.java
* Unit test to make sure EAS is being offered
* Fix "account leak" in AccountSettingsTests

This was triggered by donut bug # 2092944 but the solution is
different because we support EAS here.
2009-09-02 09:45:28 -07:00
Marc Blank a3c6c6ed29 Handle errors in account creation by AccountManager
* Don't create our EmailProvider Account until we get a confirmation from
  AccountManager that the system Account is created
* Put up an erorr dialog if AccountManager fails for some reason (this is
  what we saw in bug #2072668)
2009-08-26 13:20:23 -07:00
Andrew Stadler bcff14acf2 Create setup flow for use by Accounts manager.
* Create a new entry point for the exchange setup flow and switch
    EASAuthenticatorService to call it
* Pass "eas flow mode" down through the setup screens
* Slightly modify their behavior as we go (e.g. we skip the
    (account type" screen since we know it's EAS.)
* Add a checkbox to "sync contacts from this account" and pass that
    value into ExchangeStore when we set up the account.
* Change the flow exit to pop back to the account manager instead of
    taking the user to the new inbox.

This CL satisfies cases 1 & 2 of bug # 1974752.
2009-08-20 15:51:36 -07:00
Andrew Stadler 0d10783635 Finish loading large IMAP/POP messages
* Handle messages >25k
* When structure is available (e.g. IMAP) pull in the entire body
    and the list of attachments
* When structure is not available (e.g. POP) pull in a large chunk of
    the body to try and capture the message body at least.
* Implement loadAttachment for IMAP/POP to demand download large items
* Tested with IMAP & POP messages

INCOMPLETE (file bugs):
* implement logic for the old loadMessageForView calls that comes from
    MessageView (when you open a message that's partially-loaded)
* Resolve handling of mimetype when attachment info is read (currently
    we're assuming base64 in a couple of places)
* delete account => delete attachments
* delete attachment => delete file
* create account => clear existing attachments for acct id
2009-08-19 16:09:13 -07:00
Andrew Stadler 46d7d7f1b6 Rework service to use provider accounts and controller.
* Rewrite service logic to select and update one account at a time
* Add checkmail API to Controller, and much rework/cleanup of existing
   callback API's
* Rewrite notification posting code
* Rewire connection to MessageList to be opened by notifications, to
   cancel notifications, and to reset the "new message" count whenever
   an account is viewed.
* Boilerplate cleanup to a lot of activities because they share the
   callbacks that have had minor changes.
* Remove old push controls from Store API

In progress:
* To provide notification mechanism for EAS pushed mail
2009-08-18 00:54:34 -07:00
Fred Quintana d0254da4e0 do not merge: cherrypicked 7bb05334b3 from master branch 2009-08-16 17:15:43 -07:00
Marc Blank 948c36f47a Reimplement EAS contacts sync to work w/ new system facilities
* Modify to work with ContactsProvider2
* Modify to work with system AccountManager
* Modify to work with system SyncManager (for triggering user-change syncs)
* Sync server->client for adds/deletes implemented (CP2 doesn't handle delete yet)
* Sync server->client changes handled efficiently (only write changes)
* Some fields still not handled
* Rewrote most of the CPO code to handle server->client changes
* Sync client->server works for supported fields
2009-07-30 09:22:40 -07:00
Marc Blank 7375d950e4 Move to single EmailContent file; fix bug #1998157 2009-07-23 16:24:48 -07:00
Marc Blank 5790d1458f Work on EmailService calls, attachment loading, etc.
* Stubbed in attachment loading in MessageView for EAS messages
* Modified MessageView.Listener to implement IEmailServiceCallback
  for testing callback functionality
* Rewrote EmailServiceProxy entirely
* Simplified loadAttachment service call
2009-07-20 13:52:27 -07:00
Marc Blank 6a6d67edde Fix push bug, minor changes to logging and removal of debug code 2009-07-16 13:13:54 -07:00
Andrew Stadler 17250429db Various EAS related changes related to accounts and services.
* Renamed ISyncManager/ISyncManagerCallback to IEmailService/IEmailServiceCallback
* Restored ExchangeTransportExample to its original state; created ExchangeStore to
  handle validation functionality instead; updated stores.xml to reflect these changes.
* Add support for AccountManager in EAS code (this is necessary for the contacts and
  calendar providers to work with syncable data); created EasAuthenticatorService to
  as our authenticator, which required adding authenticator.xml and modifying the
  manifest to register our service with AccountManager metadata
* Created EmailServiceProxy as a convenience for the UI in calling into the EAS
  service; created EmailServiceStatus class for status codes in callbacks.
2009-07-13 19:10:08 -07:00