Commit Graph

23 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
Dmitri Plotnikov 2941c88fce Removing notification that is no longer needed
Now that CP2 rescans all providers whenever an
account is added.

Change-Id: I274a0ec7983f0b0c16edda2f426ec7e7de595473
2010-09-01 10:22:11 -07: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
Dmitri Plotnikov 32358f5516 Upgrading to new GAL registration API.
Change-Id: I67eaeb50ba8629a85d056da031e3b48ea7ab3858
2010-08-05 11:22:58 -07:00
Marc Blank e6cc662abc Use AccountManager for POP/IMAP; refactor setup classes
There are two major, interrelated parts to this CL:

1) Clean up the activities to reduce the use of Intents to pass
   information between activities; instead, we use a common
   SetupData structure that automatically saved/restored as necessary
   during the setup flow.  A fair amount of code and inconsistent
   use of Bundle extras has been eliminated in the process.

   * Create SetupData structure, setters/getters, and initialization
     methods to simplify the preservation of state during setup flow
   * Remove all state/flow extras from Intents; Intents now only
     specify the Activity to be started, which should greatly simplify
     the transition to Fragments.
   * Remove all state/flow fields from Activities
   * Modify existing setup activity unit tests and confirm tests pass

2) Create AccountManager accounts for POP/IMAP email accounts to
   provide consistency in user experience.  Also, internal flows are
   now identical as between account types.

   * Move account reconciliation from SyncManager to MailService, so
     that reconciliation is consistent between email and exchange
     accounts; move unit tests as appropriate
   * Add a "Sync Email" setting for POP/IMAP/EAS
   * Change MailService to respect the "Sync Email" setting in
     Settings -> Accounts & sync
   * Create PopImapSyncAdapterService to handle manual POP/IMAP sync as
     requested by SyncManager; add EmailSyncAdapterService to perform
     the same function for EAS
   * Use new PopImapAuthenticatorService to add AccountManager accounts
     for POP/IMAP accounts; setup appropriate stanzas in AndroidManifest
     and add related xml files
   * Update AccountSettings to use SetupData

Miscellaneous other changes:

   * Only allow valid port numbers in incoming/outgoing setup

Bug: 1712475

Change-Id: Ibdac52fb2c5578b86bf3992ddb1acd10f162391a
2010-07-21 19:01:41 -07:00
Marc Blank 18452ba28c Replace line of code lost in Change I9997ac96
* During refactor of referenced change, a critical line of code
  got lost; it's replaced in this CL

Change-Id: Ib6f405cdfa120f5cb5c879ab0f7df52d54970cb7
2010-07-13 20:53:16 -07:00
Marc Blank 5bd2faee5e Preliminary GAL/Contacts integration for EAS
Change-Id: I9997ac96f83f427c71caf12d591ba6069bedf935
2010-06-29 11:49:04 -07:00
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 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
Fred Quintana 794b7e9258 account manager api review changes 2009-10-05 11:29:01 -07:00
Marc Blank a4482e865d Fix service behavior w/r/t onStartCommand, onCreate, onDestroy
* Make sure to null out vars in onDestroy
* Use START_STICKY as return value for onStartCommand
* Start SyncManager from EasAuthenticator callback, rather from the
  authenticator itself (otherwise, the Account might not have been
  created when we start SyncManager)

Change-Id: I54ff8d5586e96f016b365587717710dee3202da8
2009-09-19 13:38:59 -07:00
Marc Blank 58267fe146 Fix some Contacts upsync bugs; add logging for serialization
Change-Id: I855a8ee3df520f53fc94866b8463d314cf800ca5
2009-08-28 16:37:29 -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
Marc Blank a8aedb2f37 Add "contacts" option to EasAuthenticator, which determines whether Contacts should be synced
* The state of Contacts syncing can be changed from various places in the UI
* In a future CL, SyncManager will respect this setting
2009-08-20 13:39:46 -07:00
Marc Blank 03be523b16 Don't run SyncManager unless there are EAS accounts
* Check that there is at least one EAS account before starting SyncManager thread
* Have EasAuthenticatorService ensure that SyncManager has started
2009-08-19 20:16:01 -07:00
Fred Quintana d0254da4e0 do not merge: cherrypicked 7bb05334b3 from master branch 2009-08-16 17:15:43 -07:00
Marc Blank 06275c4207 Initial support for Exchange account creation via AccountManager
* Export AccountSetupBasics so that it can be launched by AccountManager
* Update EasAuthenticatorService to return an Intent for AccountSetupBasics
* UI needs to be updated to skip account type screen, change welcome, etc.
2009-08-06 12:50:34 -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
Fred Quintana ee37898bcb update the permissions for the AccountManagerService 2009-07-23 11:05:37 -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