Commit Graph

63 Commits

Author SHA1 Message Date
Jorge Ruesga 08ace26ed6 email: imap push
Change-Id: I8a184a5644e4322ee65d969e14cd47fe119f5df2
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-10-18 14:05:32 -07:00
Jorge Ruesga e0a547bb66 email: fix eas autodiscover
Change-Id: Ifaf5f757f7f844e49f0ac635b477fcbef4926293
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-10-18 14:03:24 -07:00
Tony Mantler d716d89459 Don't assume mHostAuthRecv is loaded when checking outgoing
b/18031180

Change-Id: I428021830db373145344a3477e1c5590e8062c10
2014-10-20 17:34:23 +00:00
Martin Hibdon 1d8fd9c054 Add communication class for HostAuth
We want a separate class for communicating HostAuth objects
to and from IEmailService. The issue is that the HostAuth object
was being used for both to and from the database, and to and from
IEmailService. This is dangerous because The Email app may change
out of band with the Exchange app, and may need to change the
format of HostAuth. This bit us before when adding OAuth.
Now communication to IEmailService is done using HostAuthCompat.

Change-Id: I2fb8c2bd8158f58a7bb9bc3dc83a7936948c718c
2014-07-07 15:08:52 -07:00
Tony Mantler 76472ae40c Merge setup fragments under a single activity
Change-Id: I10cf8bb9f6bc1a26ea97ae664f0196ae9e9493b5
2014-02-26 13:47:41 -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
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
Tony Mantler 06e140e4a4 Update messaging when autodiscover fails due to an auth error
b/11538085

Change-Id: I76689cbd89eef233588804edeb3893f1ad36bebe
2013-11-05 16:14:56 -08:00
Tony Mantler 9460be06aa Don't initiate fragment transactions from onDestroy()
b/10918608

Change-Id: I649c5f86e5f77fa2ade33345969a44ffebb463b9
2013-10-29 15:44:34 -07:00
Paul Sliwowski 7df98d0a6d Fix autodiscovery failed dialog.
Bug: 11030161
Change-Id: Id97766969608016efe068e5c142407ad94438b05
2013-10-02 16:00:33 -07:00
Martin Hibdon 7140095932 Merge "reduce the length of a log tag to a legal amount" into jb-ub-mail-ur10 2013-09-26 20:35:03 +00:00
Martin Hibdon fead9986c1 reduce the length of a log tag to a legal amount
Change-Id: I6f18b9aa893cdccfebf24885b4668a50472af802
2013-09-26 13:29:24 -07:00
Tony Mantler d8ee809ac2 Make sure the account check dialog doesn't outlive the account check fragment
b/10918608

Change-Id: I65725b8935b2902ff926ba333cd41a3c1545f332
2013-09-25 11:24:55 -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 1b8e0fa23f Clean up a bunch of warnings
Bug: 9565838
Change-Id: I5e95562bbf463f057cbcc4a9884427a774473b45
2013-06-25 15:34:32 -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
Yu Ping Hu c28347552e Handle redirection during validation.
This allows the validator to tell the app that
it should use a different host.

Change-Id: Ie42c32aa7aea83e4d95d2b82b88225036b2407a9
2013-05-23 15:11:25 -07:00
Yu Ping Hu 0d5e21d0fc Read protocol version from validation bundle.
Exchange used to just re-check version on first sync.
Version is known during validation so might as well use it.

Change-Id: I004fe671a1ad30a7cfe0a0659b74b20ee2136771
2013-05-17 17:30:43 -07:00
Marc Blank 54347010fb Allow legacy imap to sync
* Remove old (and dangerous) constants

Bug: 7210754
Bug: 7212263

Change-Id: I6a1463a653c5c4823a96c9fbb9ca37e53a45b48a
2012-09-21 18:03:17 -07:00
Marc Blank e714bb9d15 Convert authorities, intents, and account manager types
* Tested ok on wiped Nexus
* Tested ok on S3
* Upgrade verified on Nexus

Change-Id: If5d4ce594f8a309cdb59589d10b1d33f3b79326c
2012-08-31 23:26:36 -07:00
Marc Blank f419287f22 DO NOT MERGE: Move emailcommon2 sources to emailcommon
Change-Id: I06df7e467cd2e0117df8b8db3ddc6ff9da13f1c7
2012-06-28 11:15:06 -07:00
Marc Blank 03cd72805d Revert to old Email app
* These are the last sources in the ICS-MR1 tree

Change-Id: Ida4651bddd92a06a518d00f3e1f275ab3a80c8ae
2012-04-25 13:58:23 -07:00
Marc Blank 258ab6ee84 Prevent NPE in AccountCheckSettings
Bug: 5911793
Change-Id: I2834ab6d139e734baed6790098f0405e6a4e957a
2012-03-02 12:41:01 -08:00
Marc Blank db3dc58fce am bcadbc5f: Merge "Fix ICS setup regression" into ics-mr1
* commit 'bcadbc5fce10278f1a557a876ebf0eb60afdf051':
  Fix ICS setup regression
2011-11-15 18:25:11 -08:00
Marc Blank c196e05ee1 Fix ICS setup regression
Bug: 5612276
Change-Id: Ic9ab3cb075be7ff4e0e5138a453a71cfcbe655b5
2011-11-15 16:07:50 -08:00
Marc Blank 2736c1a11c Rewrite of security policy handling and service code
* Remove PolicyService APIs policiesRequired, policiesUpdated,
  isSupported, clearUnsupportedPolicies, and isActiveAdmin
* Add PolicyService API setAccountPolicy, which is the sole
  method by which security policies are promulgated
* Add protocolPoliciesEnabled and protocolPoliciesUnsupported
  to the Policy class; these are packed, localized strings
  indicating policies that the protocol itself have enabled
  and/or cannot support (i.e. these are policies that are
  unknown to the DPM, e.g. don't load attachments)
* Differentiate in security notifications between three kinds
  of policy changes - changes that don't require user
  intervention (e.g. reducing requirements), changes that
  require user intervention (the legacy notification), and
  changes that make the account unsyncable (e.g. the server
  adding an unsupportable policy). Handle all possible policy
  changes cleanly.
* Make security notifications per account (with multiple
  accounts, notifications would get arbitrarily munged)
* Expose ALL enforced policies via the account settings
  screen in two categories: policies enforced (including
  both policies enforced by the DPM and policies enforced
  by the protocol) and policies unsupported (note that these
  can only be seen if policies are changed after an account
  is created; we do not allow the creation of an account
  when any required policies are unsupported).  Add a
  button that forces a sync attempt, for accounts that
  are locked out, but whose policies have changed on
  the server (this would otherwise require a reboot).
* Updated unit tests

Bug: 5398682
Bug: 5393724
Bug: 5379682
Change-Id: I4a3df823913a809874ed959d228177f0fc799281
2011-10-25 10:32:34 -07:00
Mindy Pereira 92922ea4a4 Provide an empty constructor for orientation changes.
Fixes bug:5369868 Email crash while changing orientation when there is a security exception pop-up

Change-Id: I8fc530c994d5015cb76039d2f309d98ed2c3761f
2011-09-26 11:16:39 -07:00
Ben Komalo 7683a43117 Prevent NPE in check settings fragment.
Bug: 5324512
Change-Id: I9366eb33c5acfe079c023ee4bc8c2026cde46ae9
2011-09-15 10:56:34 -07:00
Ben Komalo 715ee4ec4c Wire a custom error code for cert errors
This addesses UX's #1 concern about the UX flow for servers that require
certs - users don't know what to do after an error, so they want to kick
them into the certificate selection flow.

Bug: 5280071
Change-Id: I566707b9e680b3ef0b4c0cc8a07a8ad2c825ecaa
2011-09-13 14:08:44 -07:00
Makoto Onuki bc2eaadde9 Use parallel executor
We should eventually replace all with EmailAsyncTask, but it's the safest thing
we can do now to avoid regression.

Change-Id: I78bfc4fb2be1dcfadeb7f90092ec7adb35c1d393
2011-07-01 11:04:11 -07:00
Marc Blank 6fea021e3d Remove redundant and unused constants
Change-Id: Ie8658f86737880e3127a0a2c3b7f0557dde98b29
2011-06-29 14:30:46 -07:00
Marc Blank 35b0e95ca7 Clean up Store implementation
* Remove unused argument from newInstance/constructor
* Create ServiceStore class, the superclass of ExchangeStore (and,
  eventually, all Stores, until they can go away completely)

Change-Id: Ic5237236c5349ecf006538c58b63c1efe8e4ea61
2011-06-29 12:50:43 -07:00
Ben Komalo cb24e515b7 Add one more error state to certificate process
When the KeyStore fails to give us back a certificate for any reason (it
was removed from the keystore perhaps), propagate the error back up.

Change-Id: I4f0ef783c1665589cc8ccb43d95da43a297a3e9a
2011-06-16 16:14:03 -07:00
Ben Komalo f4dbbf1099 Indicate to the user when a cert error happens.
This introduces an exception which needs to be thrown from a KeyManager
when it tries to establish a connection with a server requesting a
certificate.

Change-Id: I06dfad7789ed5d320b630e7e4380e15da42a48df
2011-06-16 11:37:23 -07:00
Marc Blank f5418f1f93 Move Account into its own top-level class
Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
2011-06-13 15:37:22 -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
Marc Blank aeee10e57e Rework of security policy storage
* Replace crazy (and soon to be "full") bit fields stored in an account's
  securityFlags with a row in a newly created Policy table (thus, fully
  expandable)
* Update code from database version 17 to 18; adds Policy table, a
  policyKey row in Account, and a revised trigger that deletes Policy
  information for deleted Accounts
* Update old PolicySet unit tests to work against the new Policy class
* Add test for the conversion of securityFlags to Policy
* Tested in a variety of scenarios; appears to be functionally equivalent

Change-Id: I1505ee75230d6a0d3c2b62a46326f39c2c7f9eb5
2011-05-03 11:11:47 -07:00
Marc Blank 265530723b Expose unsupported policies in the UI (account setup)
Change-Id: I75b650af92c87bd990009e54072ac4b58ed0895b
2011-04-26 18:12:45 -07:00
Marc Blank d2fd1252d5 Add status code(s) for disabled sync (needed for EAS 14.0)
Change-Id: Ie65141c4d83412274dbbc39dffed7c3be394bb84
2011-04-22 12:50:37 -07:00
Todd Kennedy daf869cf60 Use an Account object to create a mail sender
Instead of boiling the account down to an unusable URI, just pass along
the Account object.

Change-Id: Ida408912de29734c8f4ed9cdf09a4d633dd03002
2011-04-20 11:14:02 -07:00
Todd Kennedy a50fc99b0c Use Account instead of URI to create transports
There's no need to create a URI just to rip in appart again. Additionally, to
support additional changes (i.e. to use Mailbox instead of Folder in the
MessageController), we need to store the actual Account.

NOTE -- This change only affects IMAP and POP3. SMTP will come in a follow-on CL

Change-Id: I400036a17271c99272fd9c603547dcd713b50b9d
2011-04-20 08:31:24 -07:00
Ben Komalo 5a2d7da136 Minor fix to error dialog formatting.
Bug: 3515558
Change-Id: Id4d88379dc68c114338fdd2d4d437a2defb94ba4
2011-04-13 16:07:50 -07:00
Andy Stadler a685d3b019 Reduce chance of crash when dismissing dialogs asynchronously
* Caught & diagnosed by crash while checking settings
* Also possible in MoveMessageToDialog

Bug: 3412875
Change-Id: Ie78c61cf5ca10ce1eedc25ba2eb97ed0ac5bc615
2011-03-15 15:02:48 -07:00
Andy Stadler 5f830f8608 Fix race condition NPE caught by monkey
Bug: 4080321
Change-Id: Ia6ef0a47f87ffdc96269a95cc3bc5564d2e98440
2011-03-10 14:56:10 -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