Commit Graph

66 Commits

Author SHA1 Message Date
Tony Mantler c83366c887 Fix some crashes and misbehavior with account settings screens
b/13954490

Change-Id: Ic81b342495a46573cb1fe78cad1f4888fffc4ae8
2014-04-10 15:28:15 -07:00
Tony Mantler 6cbdd5bba0 Fix more IME actions
b/13544189

Change-Id: I5dbbf45a1b68cac2d63ba41c70daff9d33cbb492
2014-04-04 16:36:06 -07:00
Tony Mantler ae980cd685 Account setup flow: Move button and headline handling into fragments
b/13508015

Change-Id: I9f7a09467fbee5a57985f36eaa47c2cc7b9d4086
2014-03-17 16:45:47 -07:00
Tony Mantler 5ca9d39008 Merge "Centralize EmailServiceInfo retreival and pre-fill data for autodiscover" into ub-mail-master 2014-03-12 20:24:39 +00:00
Tony Mantler 6ecdc18457 Populate certificate picker when a cert is present
Motorola: IKXREL1KK-816
b/13398087

Change-Id: I3b69c780a491808afa0cb3717020f42b41c1c0d7
2014-03-10 14:48:34 -07:00
Tony Mantler 064726d9f9 Centralize EmailServiceInfo retreival and pre-fill data for autodiscover
b/13341957
b/13356801

Change-Id: I9ed399bd6a695e14cf8019d3f62c7e5753e1f4d8
2014-03-07 14:28:35 -08:00
Tony Mantler 76472ae40c Merge setup fragments under a single activity
Change-Id: I10cf8bb9f6bc1a26ea97ae664f0196ae9e9493b5
2014-02-26 13:47:41 -08:00
Martin Hibdon 7190973877 Fix authentication view
Unfortunately, there are problems with making a single
view handle all kinds of authentication and certificate
selection. The layouts for the account settings screen
on phones versus tablets are just too different. So
now the certificate selection code has moved back to the
fragments themselves, and the authenticationView only
handles passwords and oauth.

Change-Id: I1ef0c69687a00029717b836458c85c1b0667ff95
2014-02-18 14:40:36 -08:00
Martin Hibdon 87de90282b Make settings flow work for OAuth
Now the password entry is removed from AccountSettingsBasics,
and the user is taken to either SignInActivity or AccountSetupType
after hitting the next button. This is a lot closer to the
desired setup flow as it allows for oauth signin.

Ideally this is not what we will ship for Algol, but it put us
in a state where we could ship if we had to.

Change-Id: I5b28bccd27c515572e4947ca877bd1772732507d
2014-02-14 11:55:26 -08:00
Martin Hibdon 58fbd2a477 Add sign in Activity
This allows the user to choose which type of authentication
to use for existing IMAP accounts.

Change-Id: Ib44364a1059a2c4b8a7a0fa66b14cd042b28770e
2014-02-05 13:10:11 -08:00
Martin Hibdon 78280d51db Merge "Use the AuthenticationView for outgoing" into ub-mail-master 2014-01-30 23:29:14 +00:00
Martin Hibdon 9755267336 Use the AuthenticationView for outgoing
Change-Id: I42a6a8e0dfb271f22bbf1d2d18138d27809744bc
2014-01-30 15:20:15 -08:00
Martin Hibdon d23fa61a01 Make certificate selector work
Change-Id: Id1ae8c9bb9467effc8feca9d915dc4927c4bbe25
2014-01-30 12:54:49 -08:00
Martin Hibdon 26ff609ebf Fix a crash trying to use AuthenticationFragment
Putting authentication in a fragment was a problem, it
means that we need fragments as children of other fragments.
While this works in theory, it adds a lot of complexity.
Now, authentication is done with AuthenticationView,
which is just an extension of LinearLayout.
Currently, this does not yet handle adding certificates
for exchange accounts, but I'll fix that ASAP. As it is,
this is better than the current state, which crashes on
account setup 100% of the time.

Change-Id: I4274e7250f97012c3dc476003fd36fb960f2b728
2014-01-29 21:45:31 -08:00
Martin Hibdon 9195a12024 Create AuthenticationFragment
This is one fragment that holds all types of
authentication information, e.g. password,
OAuth info, and client certificates. What gets
displayed depends upon the type of account it is
dealing with.
So far this is only used in AccountSetupIncoming,
but later it can be added to other settings fragments.
There are still some issues with this, but I'd like
to check it in sooner than later to unblock other
work.

Change-Id: Iea675ad5c1727f32ca0baa270dfa793ab7109993
2014-01-29 11:20:53 -08:00
Tony Mantler 9c8c471f97 Convert SetupData into a retained fragment
This will keep it from being recreated quite as much while off-thread tasks are possibly mutating it.

Change-Id: Ic9873489906339c33a76b8a600c0fc28016debc4
2013-12-09 12:02:12 -08:00
Martin Hibdon 9d3e01c589 Set the client cert from AccountSetup
b/9661767

Change-Id: I292ff5e190ed56077a04e37869e18a46f5473985
2013-09-27 13:47:16 -07:00
Tony Mantler 463584d23f Fix account matching at initial screen to match against email address
b/10210901

Change-Id: I64d60ca33a42a19e085dd98a7a61d68ac30027f9
2013-09-26 13:41:09 -07:00
Tony Mantler 648a067056 Fix use-after-null in AccountSetupIncomingFragment
b/7967233

Change-Id: I69b7ea521416815fce3bb9e45b38c996b9cea17b
2013-09-17 16:51:52 -07:00
Tony Mantler ecac654c66 Purge views after they're supposed to be destroyed to avoid spurious callbacks
b/10565885

Change-Id: I7ef18fdac566975d15ffd1a19f756a5e5d2aee8a
2013-09-11 16:47:47 -07:00
Tony Mantler 26cd5e024c Don't store the account creation/modificaiton state in a singleton
b/10460757

Change-Id: I7f0bea69f843f9061d1cfa9277c99d36705aceaf
2013-09-03 14:15:32 -07:00
Tony Mantler ed4accb24f Clean up warnings, finals, dead and useless code
Change-Id: I8225a78c3b1712479bb5752161e3585a2bc2be2e
2013-08-23 14:43:31 -07:00
Tony Mantler 219c3b5b84 Tidy up warnings in account setup fragments
Change-Id: I078df83dbc4afd10c0783a98bfbb23bced12489c
2013-08-22 15:09:42 -07:00
Paul Westbrook 7985b43ab7 Add public no-arg Fragment constructors
Bug: 10311630
Change-Id: I0243462cdc28b9af3151754a8c8583330418579b
2013-08-13 16:43:34 -07:00
Scott Kennedy 560bfadc31 Unify LogTag
There is now only one LogTag class. The static initializer of
GmailApplication (existing) and EmailApplication (new) will now set
the log tag to "Gmail" and "Email", respectively. Up until that code
is run, it will be "UnifiedEmail".

"setprop log.tag.Gmail VERBOSE" (or .Email) will trigger all logs to
be printed as long as they go through LogUtils, regardless of what tag
is used by that individual log. This lets us still turn on logging
everywhere in one command, but also lets us use more descriptive tags
(like the class name).

And since we no longer have three com.android.mail.utils.LogTag
classes, builds will be much easier.

Also, we now use LogUtils everywhere.

Change-Id: I55f1c7a66ce50ead54877a13e40256422a56dc39
2013-06-05 20:06:15 -07:00
Paul Westbrook 28a344042d Prevent NPE
Also add additional logging for this case

Bug: 8372753
Change-Id: I87aa9ee46f0ca866745d62d27f4b40913f2e9b97
2013-03-22 18:21:19 -07:00
Marc Blank f419287f22 DO NOT MERGE: Move emailcommon2 sources to emailcommon
Change-Id: I06df7e467cd2e0117df8b8db3ddc6ff9da13f1c7
2012-06-28 11:15:06 -07:00
Mindy Pereira ceca4751b2 Make sure to check for a null account before using the account.
This is a common root cause with monkey crashes.

Fixes b/5628984 com.google.android.email: java.lang.NullPointerException: Unable to start activity ComponentInfo{com.google.android.email/com.android.email.activity.setup.AccountSetupIncoming}: java.lang.NullPointerExceptionat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955)

Change-Id: Ib3ac5c62b72662402c7d5df4e5d895beaf324197
2011-12-02 10:30:13 -08:00
Ben Komalo 3432bdb757 Fix focus behavior in setup screens.
- properly put actionNext on most fields
- make sure actionDone doesn't do funky things with focus so that a
non-editable field gets focus. we may want to consider not making this
focusable in the future.

Bug: 5367827
Change-Id: I4e7bb13801d96a4f1e6fd02a2d43713200738b18
2011-09-26 15:49:01 -07:00
Marc Blank 81a5ba47c6 Be careful before setting account's delete policy
* We were using the getSelectedItem() from the deletion spinner to
  set the account's deletion policy, even if that spinner was
  invisible (which it would be for IMAP).
* The result of this is indeterminate; sigh
* The fix is to make sure the spinner is visible before using its
  value

Bug: 5216422
Change-Id: I7e44b5e8127f5277693f7e962899e8642be55239
2011-08-26 17:14:08 -07:00
Ben Komalo 5125c06cef Save IMAP prefix.
Bug: 4517078
Change-Id: I4f4a1e490abc78088ec8ded4e4627e5da1ac3fd2
2011-08-01 12:56:55 -07:00
Jorge Lugo 1086830bae Merge "Improve accessibility for stars and settings" 2011-07-15 15:21:44 -07:00
Jorge Lugo 7667632eb2 Improve accessibility for stars and settings
Adding and removing a star triggers the appropriate accessibility
In incoming/outgoing settings, added EditText contentDescriptions.

Change-Id: Ibab461f1425b3ebf3579ebc1d0b36d1a9a5efdb2
2011-07-14 12:01:02 -07:00
Jorge Lugo cf194df05c Don't display warning message on edit incoming settings
On phones, opening "incoming settings" no longer immediately displays
the warning message associated with editing the username field. It now
only displays when the username is focused by the user.

Bug: 4282856
Change-Id: Ic0a74fa91a0f9cff66565372872e182a0eaec779
2011-07-14 11:38:30 -07:00
Marc Blank 6fea021e3d Remove redundant and unused constants
Change-Id: Ie8658f86737880e3127a0a2c3b7f0557dde98b29
2011-06-29 14:30:46 -07:00
Makoto Onuki ce4cce05b2 Fix failing tests
Fixed activity tests and and activity.setup tests.

Bug 4762098
Bug 4766087
Bug 4590590

Change-Id: Ifbd49f38c59854c65b6c48a1b03ca8153bfa558b
2011-06-21 11:18:32 -07:00
Marc Blank f5418f1f93 Move Account into its own top-level class
Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
2011-06-13 15:37:22 -07:00
Marc Blank 69111b1e19 Fix broken account creation
* What the heck is mCacheLoginCredential for??

Bug: 4597765
Change-Id: Idcb6d323ba0e90f3fe6828f59fe36ec54e4cf40c
2011-06-12 10:06:51 -07:00
Marc Blank 85e4c101b0 Remove storeUri's except during auto-setup
* Remove per-store limitations
* Use constants for VISIBLE_WINDOW, rather than having the
  potential for differences between Stores

Change-Id: Idd5e0874bba6e3390e4f093bcb03f4b1bb399c11
2011-06-09 13:34:43 -07:00
Ben Komalo 12b82d9374 Move HostAuth to top level class.
No other changes made.

Change-Id: I1c6497c98abc0f99443ea42d8aed6295b263c123
2011-05-19 15:28:48 -07:00
Makoto Onuki bfac9f2e8a Move some of the log constants from Email to Logging
Change-Id: If9f4e4e3adcdef897a0d6a4e153bb446a8b24fdd
2011-05-13 14:24:38 -07:00
Marc Blank 0993190caf Complete rewrite of account backup/restore code
* Use EmailProvider to backup/restore into a backup database
* Remove all of the old AccountBackupRestore code
* Get rid of the legacy Account class and all of the Preferences
  crap that referenced it
* Remove corresponding tests

Change-Id: I2de75aafdacc87246174303961e58547303f641e
2011-05-09 10:39:17 -07:00
Makoto Onuki 44f45f4221 Merge "Don't use findViewById (part 1 -- account setup)" 2011-03-31 11:06:15 -07:00
Makoto Onuki 2fbb3db5d8 Don't use findViewById (part 1 -- account setup)
Added two new functions:
- UiUtilities.getView()
  is a fail-fast version of findViewById().  Crashes when there's no view
- setVisibilitySafe()
  same as View.setVisibility, but doesn't crash even if a view doesn't exist

Let's try to avoid the use of findViewById(), and instead use getView(), *right
after* the layout is inflated, so that we'll always fail-fast if a layout
doesn't have a required view.  (Rather than getting a NPE only when the view
is really accessed, which can be in a code path which is rarely executed--e.g.
only when there's a protocol error.)

Let's only use findViewById() only when we're sure no all the variants of a
layout have the view in question and leave a comment to make it clear it's on
purpose.

(UiUtilities has been moved from com.android.email to
com.android.email.activity)

Change-Id: I36e0bab65a989f5d34cf636f13e1eaee084547af
2011-03-30 13:47:13 -07:00
Todd Kennedy 206109cf44 Disallow editing username after account creation
After the account is created, don't allow editing the user name. We want to
prevent this as the user name is core to the account and changing the user
name is tantamount to creating a new account.

bug 3502279

Change-Id: I1d89710fd48aca67ba13abea5bdbdc1d87941618
2011-03-30 08:54:34 -07:00
Todd Kennedy fe68c0e7c2 Use HostAuth to determine settings changes
There were two TODO's from a prior CL where deprecated HostAuth methods
were removed.

1. Do not use a generated URI to determine if account settings have changed.
   Instead, use the HostAuth structure for this purpose.
2. The account key in the HostAuth structure has been deprecated. Remove as
   much of it as possible (until the schema of the host auth database changes,
   we must still refer to it when adding rows).

In the process, HostAuth tests were broken out into a separate unit test
file.

Change-Id: I4075da09af168f734db7b20a9ef63d4178ac2064
2011-03-01 07:49:54 -08:00
Todd Kennedy 8c89674b64 Always set a delete policy for legacy accounts
The delete policy can only be set for POP3 accounts. However, the delete policy
is used for all legacy accounts (that includes IMAP). As such, we need to make
sure IMAP accounts also have their policy set; even though the setting is not
configurable by the user.

The delete policy does not mean anything for Exchange accounts, so, we do not
need to modify the account setup code for them.

bug 3074164

Change-Id: Iab10d2997404b3b0c10a60a64fb652540c0d2d1a
2011-02-23 11:00:19 -08:00
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