Commit Graph

17 Commits

Author SHA1 Message Date
Todd Kennedy 040ddf60cf Resolve build warnings; part 5
Remove dependence upon URIs for creating the host auth structure

Change-Id: I92dee36fa329a8976b76bbd4991ed3469c6475f2
2011-02-16 17:38:31 -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 3a4b9e140e Fix failing tests in AccountSetupExchange
A recent change was short-circuiting the logic that loads
the UI from the account.  This fix simply resets the flag
so the test can reload the UI multiple times as it tests things.

Change-Id: I7cc53e2766b78172e5a7b05088e94fdec99ae0d6
2010-12-08 00:22:23 -08:00
Andrew Stadler fb4333b3a5 Allow spaces in passwords
* Separate/identical fixes for incoming, outgoing, exchange
* Unit tests
* Some protocols will fail anyway (e.g. POP3)

TODO: Some sort of warning (master only - won't backport that)
Bug: 2981433

Change-Id: I82984e5912fc7fcb88e747815d0fe33cb36605e7
2010-09-27 10:04:03 -07:00
Andrew Stadler 4c3a8ede01 Quick fixes for account setup unit tests
Some of these broke in 8bcb572ccf
which changed the [Next] button to an ActionBar menu item.

However, the entirety of AccountSettingsXLTests needed to be disabled
because the PreferenceActivity is very different on phone or XL sized
devices, and the tests infrastructure will need to be refactored to deal
with that (on another day.)

Change-Id: I9adbfc9b8da6179e4c4e82d29bb872ee05619a41
2010-09-09 09:28:38 -07:00
Andrew Stadler 641ae45358 Fragmentize Exchange setup
Change-Id: Ib331d9a7f7be7acbfe355d6a03d9ae07af0cc627
2010-08-11 16:07:26 -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
Makoto Onuki f3f15c12c9 Fix AccountSetupExchangeTests.testLoadFields()
This test has been failing since I60974b85, which is obviously correct,
so I modified the test.

Bug 2488770

Change-Id: I5a2eea19d9f3c3647b7c88a1e0db9297727b8e66
2010-03-08 15:28:38 -08:00
Makoto Onuki 83457b0235 Preparing for renaming package.
- Made tests use the new package-name-free constructor of ActivityInstrumentationTestCase2.

Bug 2226160
2010-02-16 09:16:15 -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
Andrew Stadler 8bb0ee3b92 Fix auto-discover / account verification logic
New behavior:
 * There are two primary paths through this activity:
 *   Edit existing:
 *     Load existing values from account into fields
 *     When user clicks 'next':
 *       Confirm not a duplicate account
 *       Try new values (check settings)
 *       If new values are OK:
 *         Write new values (save to provider)
 *         finish() (pop to previous)
 *
 *   Creating New:
 *     Try Auto-discover to get details from server
 *     If Auto-discover reports an authentication failure:
 *       finish() (pop to previous, to re-enter username & password)
 *     If Auto-discover succeeds:
 *       write server's account details into account
 *     Load values from account into fields
 *     Confirm not a duplicate account
 *     Try new values (check settings)
 *     If new values are OK:
 *       Write new values (save to provider)
 *       Proceed to options screen
 *       finish() (removes self from back stack)
* Added unit test for new loadFields method

Bug: 2412300
2010-02-03 10:38:27 -08:00
Marc Blank 46199c65a3 Fix #2382368 (NPE in AccountSetupExchangeTests)
* AccountSetupExchange defaultly tries using EAS AutoDiscover, which isn't
  appropriate in the unit test setting
* Add an Intent extra to disable AutoDiscover and use it in unit tests

Bug: 2382368
Change-Id: I3d4e8d7194b02da44ad583da0cf2fe60ffb19311
2010-01-27 13:57:20 -08: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
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 d2b0efa2f5 Cleanup broken unit tests from previous submit. This now works:
What works:
* All unit tests
* Editing existing accounts
* Create new accounts
* Checking account settings against server
* Mail sync using accounts
* Viewing mailboxes

What breaks (in approx order of planned fixes)
* Viewing messages
* Composing messages
* Some details of account editing
* Import of existing accounts
2009-06-09 14:46:30 -07:00
Andy Stadler 93116fe28e AI 148457: Allow exchange accounts to be set up without an empty domain
specification.  This relaxes a rule that was incorrectly applied.
  BUG=1740626

Automated import of CL 148457
2009-05-07 10:58:05 -07:00
Andy Stadler 067d0a87fa AI 148097: Fix bug in exchange account setup (actually it only affects
editing existing accounts).  Added simple functional tests for
  Activity UI.
  BUG=1812798

Automated import of CL 148097
2009-04-30 10:14:00 -07:00