Commit Graph

19 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 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 9f7e3982ad Reduce UI thread disk access in account settings
This change is in top-level settings for a given account:
* Call saveSettings async on UI changes, instead of synch at onDestroy()
* In loadSettings, get default account id async

Also sprinkled in some TODOs for future whack-a-mole fixes.

Bug: 3133639

Change-Id: I5216c78d28b35fe47e43b48ad0db3a3e57b25004
2010-12-22 13:55:42 -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
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 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 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
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 faaa115e1a Fragmentize outgoing settings (SMTP)
Also fix a small NPE in AccountSetupIncoming

Change-Id: I5728a10889a3f0f35d31962f4a13ccae4ec0393b
2010-08-10 17:45:57 -07:00
Andrew Stadler 1b156352f3 Fragmentize Incoming settings (IMAP/POP server)
Also, extract DuplicateAccountDialogFragment for reuse.

Change-Id: I042a158e264d949024347d477d6e9ec999c244d3
2010-08-10 14:28:20 -07:00