Commit Graph

24 Commits

Author SHA1 Message Date
Martin Hibdon 5f1749bb0e Prevent account reconcilliation during migration
b/17221527

Change-Id: I7077a90af8317aa38e865e345aff7fb33083ddc2
2014-08-28 13:55:00 -07:00
Tony Mantler 473ce1fa35 Fix some AOSP NPEs
In AOSP the account types of IMAP and POP overlap so we can't
reverse the protocol from the account type. This is OK since all
we care about is if it's Exchange or not.

b/17183137

Change-Id: I112e56c9a0c0009a74f391749d535ada9f0f99ba
(cherry picked from commit 18663ef54ed2d7217d0176b4c5928380deaf9f64)
2014-08-22 17:58:22 +00:00
Anthony Lee ce1faa889d b/17193866. Update policies when we reconcile.
In the situation where we have deleted an Account from our
provider reconciliation will delete the associated amAccount.
Unfortunately, there isn't any sort of side effect code path
that considers that policies may need to be updated when
this Account is deleted. This CL injects that logic.

Change-Id: I27c7a35efbdca4be274a9d3d8f7ce698f9204092
2014-08-22 10:03:44 -07:00
Régis Décamps f9d845c1b7 Fix `getAllAmAccounts()` returning duplicated accounts
Use a set to save the account types, in order to de-duplicate identical
types.

Also, remove unused imports.

Bug: 16811863 Duplicate POP accounts are listed
Change-Id: If699d03b2c12959cfde9926bec9352b71c3d8912
2014-08-06 20:27:39 +02:00
Anthony Lee ebe49cfeaf b/16570506. Only enable alternate EAS authenticator when needed.
The old code was turning on both the EAS authenticator and the
alternate EAS authenticator (with the offending string). Now it
turns on the right one depending on the VendorPolicyLoader.

Change-Id: I69945e695f28fdb8bd33bf49ee253a354c05b30c
2014-07-28 14:37:02 -07:00
Martin Hibdon 74dc106ae9 Disable Eas Authenticator if Exchange is not installed
b/16541219

Change-Id: Ibc2a9608278762e6af4f7c429b08ad38935bfcae
2014-07-24 15:46:15 -07:00
Paul Westbrook e817be1353 Specify compose activity with resource.
Allow the compose activity, that the account reconciler attempts
to enabled/disable, to be able to be specified via resources.

This allows the various build targets to change the activity that is
enabled/disabled, or to not attempt to do this at all

Change-Id: I7c91c2c179316a3aac910a38d7dd0025076b085a
2014-06-17 15:47:33 +02:00
Martin Hibdon 3f4a556d54 Fix Calendar and Contacts syncing for POP and IMAP accounts
b/11818312

Change-Id: I34b82040991506bf9099cc0df237454a8f97c764
2014-03-24 17:17:05 -07:00
Tony Mantler dc7fe8964c Disable the compose activity when there are no accounts configured
b/10042454

Change-Id: I45767d3e727b4c1fe858d80ca2e063b491827302
2013-12-17 14:24:37 -08:00
Alon Albert 3e8e59798b Null Protect Account Info
Bug: 11355850
Change-Id: Idb42769b3009787efb4edfe2ffbd65171cd8d8d8
2013-10-29 16:47:24 -07:00
Tony Mantler ac1d3249fb Remove notifications while we still know what type of account this is
Also add null check just in case

b/11070468

Change-Id: I187b9b084512a2b994f4a0a3b750ade5eee50624
2013-10-04 12:27:20 -07:00
Tony Mantler ed0ee50a12 Match against both account name and type when reconciling accounts
b/10210901

Change-Id: Ice60ab64a2f7287be9ee639e5777f85bda4bd390
2013-09-25 13:34:04 -07:00
Tony Mantler 4265ade29a There's no such thing as a wrongly incomplete account
b/9856118

Change-Id: If2d2c50989285a13eb0ae29961733e472e26c978
2013-09-17 16:03:14 -07:00
Martin Hibdon 24bb2dabd9 Kill the process when an account is deleted.
b/10653370
This prevents NPEs if a serviec happens to still be running
when an account is deleted.
This mirrors a similar pattern in the gmail app.

Change-Id: I6fd8ae5ffe41580df0a321ec22535403e3f32eee
2013-09-12 18:21:18 -07:00
Yu Ping Hu afe097f318 Simplify account reconciliation.
- Rather than handle by type, do them all at once.
- Simplify when reconciliation happens.

Bug: 9056861

Change-Id: If264678c82c63090246ef8ff857c8e46f6672c85
2013-07-26 16:06:14 -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
Scott Kennedy d8302b01fa Ensure notifications get cancelled when necessary
There were a few places calling the old notification code to cancel
notifications. These calls were completely unnecessary.

Also, when an account is removed, we now clear all notifications that
may exist for that account.

Bug: 7935576
Change-Id: I58f7e194c3f9a928e932b3b1b87475e7d3653b6a
2013-05-22 18:36:07 -07:00
Marc Blank 78b8c04898 Add another test for "incomplete" accounts
* We have been erroneously marking some accounts "incomplete" and
  this can cause reconciliation to fail after deleting the
  accounts in Settings.
* Still need to investigate why the flag isn't cleared at times...

Bug: 7148506
Bug: 7166598
Change-Id: I0059580a6e4b6a5c54c09b8409c4358ff707ff77
2012-09-21 11:27: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
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 ebb79619e8 Move account delete logic to EmailProvider
* This functionality had to move away from Controller

Change-Id: I557918a325eab8c83a9728fa1ce33dde8b86158f
2012-03-09 12:59:21 -08:00
Ben Komalo 002a1802ca Prevent flicker in opening Email.
Welcome had some assumptions that some things had to be done
asynchronously, such as checking inbox status.
This can now be done on the UI thread and so transition into Email can
be done immediately in onCreate, except if there's reconciliating to
be done

Bug: 4599569
Change-Id: Iaaac21e73c985c60e1b7974fb0429948b35968e4
2011-09-19 16:50:07 -07:00
Ben Komalo 7688300055 Fix sync window settings for EAS setup on phones
- the container is the one that should be visible/gone - individual
fields should just be visible
- also do drive by javadoc fixes

Bug: 5052310
Change-Id: I45c4b6b7f94b2b62ac94eeff0ab97bf34c9e117a
2011-07-20 11:27:11 -07:00
Marc Blank 4e4aba9ebc Clean up account reconciliation
* Move AccountReconciler to the Email app (from EmailCommon)
* Ensure that Controller.deleteAccountSync() performs ALL actions
  needed to clean up after an account deletion (delete attachment
  files, reset policies, refresh the UI, etc.)
* Add reconcileAccounts() API to AccountService
* Remove accountDeleted() and restoreAccountsIfNeede() from the
  AccountService API
* Remove unused callback

Bug: 4883073
Bug: 4767084

Change-Id: I43ffaf009db1a6f306bb0f2a74fb4dd3b2c4b966
2011-07-19 10:31:33 -07:00