Commit Graph

28 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 a7bc0319a7 Email split, part six: EmailContent
* Moved EmailContent to emailcommon

Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
2011-02-10 19:44:29 -08:00
Andy Stadler 27c70e3322 Preliminary XL version of Account Type screen
* Add new account type layout for XL devices

Bug: 3188940
Change-Id: I12ebe60075971fa14c7c55be65dccc0b7602f566
2010-11-14 21:37:41 -08:00
Andy Stadler ba4e72a947 Cleanup various IMAP/POP manual account setup defaults
These defaults affect manual setup only.  There should be no changes
observed in automatic setup, and no changes observed in EAS setup.

* user $email instead of $user as default login
* guess "imap." or "pop3." for server name
* propagate the incoming server name to the outgoing server name, and
  replace "imap.", "pop3." or "pop." with "smtp."

Also, fixed a couple of leftover places where we were trimming
passwords (and should not be, since some people insist on having
spaces in their passwords.)

Bug: 2978634
Change-Id: I9b0e345aa9550b5e1cc29aaa22109f03da61af20
2010-11-03 09:31:45 -07:00
Andrew Stadler cd09545b87 Provide runtime switch for GL acceleration
* new checkbox in debug fragment
* saved value in prefs so it's sticky
* each Activity calls a helper to enable/disable per that flag

Change-Id: I1af1ae9f401bc746cc97da00dfb0e06407b79d46
2010-11-01 16:16:27 -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
Andrew Stadler 63ab9de1b8 Partial solution to make EAS setup respect "manual"
* Track whether the user clicked "manual" vs. clicking next (and falling
  into "manual" because the account is not found in the providers list.
  Convert this into an "allowAutoDiscover" parameter.
* Pass "allowAutoDiscover" down into AccountSetupAccountType and through
    into AccountSetupExchange.  (Note, it's unused/ignored for POP & IMAP
    accounts and should not affect them.)
* In AccountSetupExchange, use the existing EXTRA_DISABLE_AUTO_DISCOVER
    (previously only for testing) to suppress autodiscover in manual mode.

Bug: 2570919
Change-Id: I2583e00d1e6cc26bbd4b85134eddae8cc3a1f91e
2010-04-05 19:08:05 -07:00
Andrew Stadler a1550678af Integrate policies into account setup process
* Rename SECURITY_POLICIES_REQUIRED to SECURITY_POLICIES_UNSUPPORTED
* Create new pathway for SECURITY_POLICIES_REQUIRED, making it advisory
* Cleaned up strings for account setup error dialogs
* Refactored AccountSetupExchange.onActivityResult() to split up the
  three primary use cases, making them more readable.
* Always finish() in AcccountSetupAccountScreen, because it's usually
  cleaner to return to the previous screen (enter username & password).
2010-02-04 15:04:48 -08: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 f613489663 Add "vendor policy" loader, and alternate exchange descriptive text.
- Dynamically switch to the alternate exchange strings to substitute overlays.
- Added the mechanism to load the "vendor policy", which tells you when the
  alternate strings should be used.

Bug: 2382710
2010-01-27 17:40:56 -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
Marc Blank f1efd65a5e Fix "back key" flow for Email account setup
* The existing flow is badly broken; every "back" causes the user
  to leave the setup flow and therefore have to start from scratch.
  This is a very bad user experience, as previously entered data is
  lost and must be re-entered.
* The fix corrects these problems, allowing the user to back up
  through screens UNTIL the account is successfully created.
* After account creation, the user is returned to the proper screen,
  depending on whether we're in "eas flow mode" or not

Bug: 2337511
Change-Id: Ie25ac73dfcd8a1dca36e1b31c75ffb22359840d1
2009-12-21 11:28:53 -08: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 9e2c6bd5f2 Remove saveOrUpdate from EmailContent to prevent stale writes
* Numerous classes modified to deal with this change
  * Fixes bugs 1993292 and 1994671
  * Renamed various setter and getter methods to reflect the underlying
    field names
  * Renamed syncFrequency to syncInterval in Account and Mailbox
  * Convenience method added to AccountSettings to save only user settings
  * Calls to content.update(context, content.toContentValues()), which save
    all fields, should be double-checked for correctness, making sure that
    content has current data and will not conflict with other threads that
    might modify that data
  * Ran all unit tests to confirm proper function

NOTE:  The logic to enforce single default account no longer works,
because that logic is in Account.save() and does not run via
Account.update().  I have patched out a small section of the relevant unit
test and will file a bug to come back for this fix.
2009-07-22 15:13:30 -07:00
Andrew Stadler 4e4abc645c Clean up launch-time & account setup behaviors.
* Moved welcome message into account setup basics (name/pass)
* Reworked Welcome to go to AccountSetupBasics on count=0
* In AccountFolderList, removed old welcome message code, and add
  code to launch AccountSetupBasics when last account is deleted
* Fixed shortcut picker so launcher shortcuts work again
* Reimplemented shortcut receiver (in MessageList now)
* Default EAS accounts to SSL

Addresses bug 1916583 & 1987440
2009-07-21 11:06:14 -07:00
Marc Blank a290f503f1 Refactored EmailStore, EmailContent, EmailProvider
EmailStore goes away, replaced by EmailContent
All database activity is moved to EmailProvider
2009-06-15 14:49:11 -07:00
Andrew Stadler 294a4fd0c6 Enable creation of new accounts using provider-based accounts.
What works:
* Editing existing accounts
* Create new accounts
* Checking account settings against server

What breaks (in approx order of planned fixes)
* Some details of account editing
* Viewing mailboxes & messages
* Mail sync using accounts
* Import of existing accounts
2009-06-05 16:09:18 -07:00
Andy Stadler 63a22008c7 AI 148376: Two policy changes for lookback window: (1) Change default
for new accounts to "1 day".  (2) Remove "all" from the list
  of available lookback window sizes, to prevent runaway
  during our simplistic sync model.
  BUG=1789913

Automated import of CL 148376
2009-05-06 17:46:25 -07:00
Andy Stadler 9197f42894 AI 148216: Provide UI for fixed sync window sizes, as required by EAS.
When in fixed sync window size mode, change "load more
  messages" to "refresh".
  BUG=1789913

Automated import of CL 148216
2009-05-01 15:30:33 -07:00
Andy Stadler c05afb24bb AI 148019: Add "accountInstanceLimit" to stores.xml so a given type of connection
(e.g. EAS) can limit itself to n (usually 1) accounts per device.
  The UI for this is really simple - don't show the EAS button when the
  limit is reached.  More work would be required in
  AccountSetupAccountType.java in order to do a more sophisticated UI
  (e.g. show the button but pop a toast if the limit is reached.)
  BUG=1740626

Automated import of CL 148019
2009-04-29 17:10:25 -07:00
Andy Stadler cd7e5664f9 AI 146061: Add persistent storage that Store classes can access.
The current design for Store classes (e.g. IMAP) did not provide for
  any persistent storage.  This is the beginning of a mechanism to
  provide that.  It's quite simplisitic - each Store can read/write one
  persistent string - but that's enough for the first simple use case
  (saving some sync data for EAS).
  The core changes here - suggest reviewing first - are in Account.java,
  Store.java, and AccountUnitTests.java.  Everything else is just
  following the API change that was necessary.
  Note that, by definition, this only applies to remote stores (e.g.
  IMAP, POP3).  You'll see everywhere that LocalStore is passed null, and
  this is correct - LocalStore *is* persistent storage and does not need
  access (so far, at least).
  BUG=1786939

Automated import of CL 146061
2009-04-13 20:07:56 -07:00
Andy Stadler ea6fea9bb2 AI 144953: Provide UI for push mode accounts.
1.  Generalize the code for the various spinners that control
  account check frequency.
  2.  Provide an API for looking up store attributes (and refactor
  existing instatiateStore logic to use it).
  3.  Cleanup the old code that was used to setup frequency spinners.
  4.  Hardwire Exchange accounts to default into push mode.
  Notes to tester:
  1.  For each account type (POP, IMAP, EAS) we need to check that
  auto & manual creation "do the right thing" for frequencies.
  POP & IMAP should offer "none" or time intervals, while EAS
  should offer "push", "none", or time intervals.
  2.  EAS accounts should default to "push", all others to "15 min"
  3.  Make sure that you can edit existing account settings and see
  the right choices (only EAS should be offered push).
  4.  I couldn't write an automated test for the mail checker service,
  please confirm that POP & IMAP accounts are checked at the right
  intervals (or never, if set for "none".)
  BUG=1776149

Automated import of CL 144953
2009-04-07 17:35:13 -07:00
Andy Stadler 87c43cada6 AI 144525: Add structural support for Exchange transport. The idea is that
the shipping client will include the necessary generic pieces for
  configuring an Exchange client (e.g. account setup) but will not
  include actual Exchange client code (e.g. transport / protocol).
  Also added a "sample code" implementation of Exchange for use
  as a starting point for implementors.  (Note, this will not ship
  in Donut, it's a placeholder for working on the "framework"
  aspects.)
  BUG=1740621,1740626

Automated import of CL 144525
2009-04-03 16:02:55 -07:00
Andy Stadler 2b0c619f1e AI 144520: General cleanup after the integrations in CL 143018. Some spelling
errors, inconsistencies in passing Application/Activity/Context, and
  some error handling cleanups.  These are all changes that would have
  probably been made before the original submits, but I didn't want
  to fix them in the integration step.
  BUG=1740621

Automated import of CL 144520
2009-04-03 15:40:49 -07:00
The Android Open Source Project 96c5af40d6 auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
The Android Open Source Project 8c2158a5eb auto import from //depot/cupcake/@135843 2009-03-03 18:28:50 -08:00
The Android Open Source Project 687f9962d7 Code drop from //branches/cupcake/...@124589 2008-12-17 18:05:56 -08:00
The Android Open Source Project 8978aac197 Initial Contribution 2008-10-21 07:00:00 -07:00