Commit Graph

44 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
Jorge Ruesga 8b1818d4a8 email: add an option for delete the account
Change-Id: I0f0f2b7ea950d5154f90cd60261c6918b7ad36b7
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-10-18 14:03:22 -07:00
Martin Hibdon 51c653646d Put debug screen back into settings
There is still work to be done here:
* The debug setting is not persisted in Exchange, so if
the exchange service is killed, when it restarts the logging
will not be active.
* Nothing in Exchange actually does any additional logging
if this logging is turned on.

Change-Id: Ic578e6956f70dd47fba9b2895385312f71c47abf
2014-08-28 11:53:51 -07:00
Martin Hibdon 7afbeee47e Update IEmailService
Add version support
Change deleteAccountPIMData to deleteExternalAccountPIMData.
Data kept inside the EmailProvider can be deleted from within
the Email app. Only external data (e.g. contacts and calendar)
need to be deleted by the service which has protocol specific
knowlege.

Change-Id: I875d3051d0cfdbaf52775ec20eb114a345894a93
2014-07-11 15:49:45 -07: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
Martin Hibdon fb2a3a2f77 Update IEmailService
This is not yet finalized, but it's needed to fix push syncs
on exchange.

Change-Id: Iaff20aa0bdea9685ef6603de1f861d58fbab6ff1
2014-06-18 14:19:34 -07:00
Martin Hibdon 163323294e Change IEmailService.sync to have two different forms
Change-Id: Id8e770154d6116b02746cbdfb8c7cdc9358398de
2014-05-30 14:49:47 -07:00
Martin Hibdon c5f5a14ae9 Revert "Get rid of deleteAccountPIMData from IEmailService"
This reverts commit cf2178c4fa.

Change-Id: I9b05dd7a29a2d2edf64529ca28e2305737a43115
2014-05-21 20:41:37 +00:00
Martin Hibdon cf2178c4fa Get rid of deleteAccountPIMData from IEmailService
This doesn't need to be part of the service because the
implementation doesn't need to be different between any
of the different protocols.

Change-Id: Ifddf16dd3ccaf397029f08f6d4283d9a5630f717
2014-05-21 12:18:29 -07:00
Yu Ping Hu 8103f960d0 Add sync to IEmailService.
This supports the EasService design.

Yes, I just removed a startSync function from this interface last month. No,
I didn't quite know at the time that I'd be adding one back. :)

Change-Id: I19d9c7838473d8982560764fdba0056cba03d132
(cherry picked from commit 4a5b11d650)
2014-03-20 00:11:36 +00:00
Anthony Lee 70cb2878d7 Changed the IEmailService interface to accept and accountId in
the loadAttachment() call. This work was necessary to support
the new EasService & EasOperation infrastructure.

Change-Id: Idd507aec999596ccd4afa5f03ff2b3c2e38a9029
(cherry picked from commit efac8255ed75d22e60036e19e7a95f8407d18ad3)
2014-03-19 23:53:28 +00:00
Yu Ping Hu 701134953e Add pushModify to IEmailService.
This call lets the service know that the push settings for an
account have changed.

Change-Id: I7ed41853df6af6762c80283a2a3510ce41551657
(cherry picked from commit 446136a2278652c627068ecddff534de1ad431ab)
2014-03-19 23:51:14 +00:00
Yu Ping Hu f679cd08d1 Delete unused functions from IEmailService.aidl.
Change-Id: I131d2d3436a50c94d664fc57c6514481d9afbc97
(cherry picked from commit 8ff6c107867bc2044ba50cad010dbf4a2e93436e)
2014-03-19 22:35:47 +00:00
Yu Ping Hu a60550e0eb Fix account deletion when removing security policies.
- Delete accounts, not just account data.
- Wait for PIM data to get deleted before proceeding.
- Reconcile after deleting an account.

Bug: 11856902
Change-Id: Ie52b7c583688bf48a33bcf6b4e555b8c055b476c
2013-11-25 12:50:28 -08:00
Yu Ping Hu a5a28ffb63 Do not require RPC for getCapabilities.
Bug: 11241892
Change-Id: I3da136c9035414c821ee2038da01134c551bb9dd
2013-10-18 14:09:09 -07:00
Paul Westbrook e4ac06080b Don't use implicit events
Bug: 10189773
Change-Id: I4579f2e465bd23b8ab4cdf291bfbe80cf6518328
2013-08-28 14:31:09 -07:00
Yu Ping Hu 2075c97f60 Delete most of IEmailServiceCallback.
The old callback mechanism is deprecated, in favor of making
calls on the ContentProvider.

Bug: 9842867

Change-Id: I65f559e593cda24456c4ffb96f785e054626dd0b
2013-07-29 20:04:42 -07:00
Yu Ping Hu 9a1f00bee4 Change deleteAccountPIMData to take emailAddress, not id.
By the time the remote call actually runs, the account
may be deleted from the DB, so the account id is likely
useless.

Bug: 9021105
Change-Id: If28b4b8c4b5c52be35c6ff68b326c4ea28d7f7b4
2013-07-19 18:42:43 -07:00
Yu Ping Hu d5acf0bbc0 Explicitly pass a callback when loading attachments.
This is part of moving away from the explicit setCallback,
which either has race conditions or is very noisy, or both.
(Each IEmailService call that wants callbacks should just
pass the callback explicitly.)

I'm not yet changing how the services actually handle the
call. Each protocol will need to fix this on their own.

Bug: 9735207
Bug: 9842867
Change-Id: If8cf69ffe82f3544ace9e58b1db5a183f38d038a
2013-07-15 21:54:02 +00: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
Yu Ping Hu 9e7f5a2a33 Use system SyncManager for Exchange.
Change-Id: I77e4e75c94c532d22a28cf97e6f55f1259b8bdde
2013-04-25 14:03:00 -07:00
Yu Ping Hu 7dd26feaea Merge "Improve mailbox sync and load more." into jb-ub-mail-ur9 2013-04-11 21:18:47 +00:00
Yu Ping Hu 17d5bbf768 Improve mailbox sync and load more.
- Update syncTime for IMAP and POP whenever we sync.
- Change load more to simply include the delta in the RPC
  rather than using the visibleLimit column.
- Add a query to get the message count for a Mailbox.
- Refactor code for updating totalCount and determining
  the new message count when syncing.
- Remove dead code from Mailbox.
- Remove uses of visibleLimit from code.

Note that visibleLimit and messageCount in Mailbox table are
no longer useful and will be removed in a later change.

Bug: 8579767
Bug: 8523146
Change-Id: Ieb67e3b6f1c82c3b21b972c5a1e557cd75dc21db
2013-04-11 21:06:08 +00:00
Paul Westbrook 69ef2b22ff Fix TempDirectory initialization
The proxy for local services were not intializing the TempDirectory.

Also, move the TempDirectory initialization out of the try/catch block.
Otherwise if Device.getDeviceId threw an exception, the temp directory
wouldn't be initialized

Bug: 8531456
Change-Id: Iea34e0b03203d6c6fe6e5d1ae9902d081bd90c27
2013-04-11 00:39:56 -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 0b5f15d61e Make sure account capabilities get set properly in UIProvider
* Change getCapabilities API to take an account, rather than
  the id of the account
* getCapabilities() can therefore execute even before Exchange
  is fully up and running

Change-Id: Id4c2a9942ea7a21e0c56401c50206b680274b43e
2012-07-25 13:25:02 -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 4f813fb129 Convert POP3 to service
* Remove MessagingController and (almost all of) MailService

Change-Id: I8953b58b237de6a71fda770f1727bd94081fec55
2012-02-16 10:27:00 -08:00
Marc Blank c84467afe1 Start of IMAP conversion to Service architecture
* Handle startSync and loadMore
* Use SyncManager rather than MailService for periodic sync
  and upload sync
* First of many CL's to disentangle sync from UI
* Note that the large majority of this CL is a refactoring
  of IMAP specific code out of MessagingController and into
  ImapService; MessagingController will eventually be
  removed entirely from the app, as will much of Controller

Change-Id: I13546d0694479b33cf93c25920dedc1d38227f6c
2012-02-13 11:04:56 -08:00
Ben Komalo 22409fcffa Pass HostAuth when validating an account.
Since HostAuth is fully Parcelable, no sense passing the individual
fields.

Change-Id: I4d8fd2bbe7b47e8f1e2ff00c8c0cad8429eec159
2011-06-14 14:47:18 -07:00
Marc Blank 75a754660e Update searchMessages API
* Store various search parameters in a new parcelable class

Change-Id: Iadec6a803b1bf17d89cd401c3fca1cb0ad3340d4
2011-06-02 21:41:17 -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
Todd Kennedy e87ff6c3cb Opportunistic cleanup
not making any real code changes:
* removed deprecated, unused methods
* remove 'throws' clauses when that exception is never thrown
* renamed method Controller#moveMessage()-->moveMessages()

Change-Id: Ifd006f760f0c19283e94a11a45c71295c8da35f7
2011-04-27 12:01:04 -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 c60b8d0529 Add searchMessages command to EmailService
* Also, document service methods in EmailServiceProxy

Change-Id: I46cc68c8c2aa870ea82474c70d944640bb66b0ef
2011-04-04 11:28:25 -07:00
Makoto Onuki 19b2a7ebc9 New debug setting to enable strict mode logging.
For now it only enables it for the main process.  I've added a flag
to EmailServiceProxy for EAS, but it's not used in the exchange side.

Bug 3500292

Change-Id: I5b27c69fe7cc995a430e9def54b2463076032c78
2011-03-02 10:41:48 -08:00
Ying Wang 37f3385803 Split out emailcommon/Android.mk
Change-Id: I846ee2a4b541f4709e647aa537c61549db2bec2e
2011-03-01 15:56:27 -08:00
Ying Wang a07f2ae0b1 Revert "Split out emailcommon/Android.mk"
This reverts commit c28bf35319.
2011-03-01 14:52:05 -08:00
Ying Wang c28bf35319 Split out emailcommon/Android.mk
Change-Id: I90653e8601ee3ee6a8719d87ffb93222a11a22c0
2011-03-01 12:29:05 -08:00