Commit Graph

19 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
Andy Stadler 858c282277 Handle leading/trailing space in passwords
* Allow, but provide warnings via EditText.setError()
* Remove one last instance of password trim()

Bug: 2981433
Change-Id: I406a4f8b8f27cc5ce90424a8cafe88a677e72f45
Signed-off-by: Andy Stadler <stadler@google.com>
2011-01-19 16:40:15 -08:00
Todd Kennedy c890a4e4a2 Display dialog if unsaved settings would be lost
When navigating away from a preferences screen and unsaved settings would be
lost, display a confirmation dialog. The user can either accept or cancel the
action. If canceling, the user is returned to the settings screen they were
currently on. Otherwise, they are taken to a new fragment (the exact
destination depends upon whether the user navigated "back" or selected another
header)

There is one additional change that needs to be made. In the case of navigating
to another header, we are notified _after_ the new header is selected. In this
scenario, the action is not cancelable and the user will lose any changes. We
must display an appropriate message when this happens. [note: this is the same
behaviour as when the user selects a breadcrumb]

bug 3327737

Change-Id: I4bd3b393a6323f3e63510e3ed08e4e1e745b04c4
2011-01-14 16:09:09 -08:00
Andy Stadler 983e1ad53b Make breadcrumbs work in server settings fragments
* Switch to newer startPreferenceActivity API
* Newer API lets us pass a string for the breadcrumb
* Get rid of newInstance() calls in all three server settings fragments

Bug: 3188951
Change-Id: I86ae91d63ff7bd32fa0eab96ac18686bb5e3e313
2011-01-13 00:07:09 -08:00
Andy Stadler 6e71978ec3 Move account edit save settings off UI thread
* Caught by StrictMode
* The fix prevents ANR
* Removed vestigial cruft from the saveSettingsAfterEdit() implementations

Bug: 3133633
Change-Id: Id41fb74269a2b72cc17121e33684b459d3eec869
2011-01-07 13:33:07 -08:00
Andy Stadler 8d22e85e45 Reduce/eliminate DB access in server settings
* Create shared async worker to check for duplicate accounts
* Use it in AccountSetupIncomingFragment
* Use it in AccountSetupExchangeFragment
* Debounce proceed/next button because work is now async
* Also, upgrade leftover old-style code in AccountSetupOutgoingFragment

Bug: 3134666
Change-Id: I5c24a6546d1ab66aedc5c4ac826ddf4f1ff53446
2010-12-22 18:57:27 -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
Andy Stadler 112ed496f8 Update server settings to current look
* For each of incoming, outgoing, exchange fragment, create a "settings
  mode" which slightly alters the layout for use in AccountSettingsXL.
  * Build a settings mode wrapper layout around the basic fragment
  * Add new constructor to set "settings mode" and select layout
  * Add wiring for cancel/next buttons in the fragment
* AccountSettingsXL configures each fragment in its settings mode
* Remove old actionbar "Next" options (no longer needed)

TODO: Pixel perfect adjustments, colors, fonts, etc.

Bug: 3188951
Change-Id: Iba26281b214333db301dd40d6c016b6c5a932c2d
2010-12-02 21:45:04 -08:00
Andy Stadler 1f3e117951 Fix rotation problems in setup/settings
* Fix incomplete tracking of mLoaded flag
* Defer validation on automatic reload of fields (on rotation)
  until reconstruction completes and we're ready to do validation.
* (For Incoming only) Split loadSettings into configure and reload phases;
  We need to configure the UI every time we restart, but we don't want
  to reload & overwrite user-entered values on rotation.
* (For Exchange only) Properly show/hide trust certificates options on
  rotation, and show/hide divider too.

Bug: 3170922
Change-Id: If3de30ee2d4d5668b29698af73f545510692777e
2010-11-22 19:02:16 -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 2731aef45c Convert exchange setup to use checker fragment
* AccountCheckSettingsFragment now supports AutoDiscover
* Clean up callbacks for account check & autodiscover errors
* AccountSetupExchange now supports rotation
* Remove dead code in SetupData & AccountSetupBasics

TODO next CL: Remove all edit flows from setup activities
TODO next CL: Remove old CheckSettings activity

Change-Id: I3c9884856ca6e70226374fdb28400bfb3588387e
2010-09-13 14:04:45 -07:00
Andrew Stadler fd14496c49 Convert setup to use checker fragment
* Activities modified to use new check-settings fragment:
  * AccountSetupBasics (auto-setup for imap/pop)
  * AccountSetupIncoming
  * AccountSetupOutgoing

Next CL: Same work for exchange, and terminate old CheckSettings activity.

Change-Id: If5c5bfe331161b2429f7d7a4bd13290932f03c47
2010-09-10 15:51:37 -07:00
Andrew Stadler 55110ca1ad CheckSettings as a true fragment
* Create new retained fragment + asynctask as the worker
* Stateless dialog fragments for everything else (progress & errors)
* Used for account settings, incoming & outgoing, only so far

TODO: Support for account setup workflow
TODO: Support for autodiscover workflow
TODO: Remove old checker activity when complete

Change-Id: I1fdafa1a51c53b934e59ea4af7d3e0ac24a3da17
2010-09-07 22:20:51 -07:00
Andrew Stadler 1a5e1e1593 Use real fragments for incoming/outgoing/exchange settings
* From account settings, switch to incoming/outgoing/eas fragments
* Show "Next" button in actionbar (may be dup'd in single-pane view)
* Common base class for in/out/eas fragments
* Depends on PreferenceActivity.startPreferenceFragment(), new API
* If the user clicks an account header while editing server settings,
  present a dialog before discarding the changes that haven't been
  checked yet.
* Confirm working (if a bit ungainly in appearance) on phone screen

Change-Id: I03591b9a8ffd11fe26fc6f58a5698740e61d0090
2010-09-03 14:30:21 -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
Andrew Stadler 7b5c5cf2a9 Use new fragment API features for dialog fragments
* Use fragment arguments for dialog parameters
* Use target fragments to report ok/cancel

Change-Id: Id2a4cc91b1f589273b1000dca30e8c2feff6d32e
2010-08-15 23:00:08 -07:00
Andrew Stadler 641ae45358 Fragmentize Exchange setup
Change-Id: Ib331d9a7f7be7acbfe355d6a03d9ae07af0cc627
2010-08-11 16:07:26 -07:00