Commit Graph

40 Commits

Author SHA1 Message Date
Marc Blank 3a5c1fb274 Email split, part neuf: Setup, logging, attachment glue
* Make "Exchange" option in account setup depend upon availability of the
  Exchange EmailService
* Make presence of Exchange logging depend upon availability of the
  Exchange EmailService
* Make AttachmentDownloadService use service rather than ExchangeService
  class
* Move SSLUtils to emailcommon/utility
* Move account manager type defs to emailcommon/AccountManagerTypes
* Update proguard.flags
* This is the penultimate CL for the Email package itself; the next CL
  creates a clean, SDK-compatible Email application

Bug: 3442973
Change-Id: I9162cf5fa6b5a043ded0fdd1e25fd3ce5948ad8f
2011-02-14 16:08:55 -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
Marc Blank 8a57469460 Email split, part trois: AccountService
* Create AccountService.aidl and AccountServiceProxy in emailcommon
* Implement AccountService in email
* Use AccountServiceProxy in Exchange for account reconciliation,
  notifications, etc.
* Move sync window constants into emailcommon
* Split attachment provider utilities and constants into emailcommon

Bug: 3442973
Change-Id: I89dce28b799b193243c07774dab65d830ae62775
2011-02-10 14:32:01 -08:00
Marc Blank 0d4fc55861 Email split, part one: EmailService
* Create emailcommon package
* Move EmailService classes to emailcommon package
* Change references to aidl's to emailcommon package
* Add getApiLevel() command to EmailService

Bug: 3442973

Change-Id: Ic7d2115363cdff6ebb86c46650b0a5b2109b1c72
2011-02-10 13:10:38 -08:00
Todd Kennedy 5e39f90e9d Resolve build warnings; part 4
Fix unchecked warnings

Change-Id: I872740fca4e5050e6ed2922eabc7e46e5e97ff3c
2011-02-03 12:44:24 -08:00
Marc Blank da0225cfd9 Ensure that EAS reconciler uses current account list
Bug: 3369380
Change-Id: I00f18f0848232ea90149fb6e243f147d0e6f5c0f
2011-01-25 15:26:28 -08:00
Marc Blank 2fabab32b9 Don't require sSyncLock for sync error map
* Use ConcurrentHashMap; check that this provides enough protection
  for all uses
* This resolves known deadlock issues in ExchangeService

Bug: 3371039

Change-Id: Ie4ccbe7cdfe8c3d4ec7a0f789409126c8c09f8c4
2011-01-21 18:14:04 -08:00
Todd Kennedy f92dd2bf3e Don't display toast for background download failures
When downloading attachments in the background, do not display any errors
on the display.

NOTE: This is a partial fix for general background attachment downloading issues

bug 3373982

Change-Id: I874ed902bde293303e10308f38b992b2bb15b6aa
2011-01-21 15:17:29 -08:00
Marc Blank f24b1a6f3f Respect email sync setting
Bug: 3362586
Change-Id: I585abcec95a668d04d37886b98a6a0b66a0fae4e
2011-01-20 11:59:12 -08:00
Marc Blank 3dda4c4fdd Merge "Delete PIM data during folder sync/reset" into honeycomb 2011-01-17 12:47:32 -08:00
Marc Blank 67d7a741cf Delete PIM data during folder sync/reset
Bug: 3361000
Change-Id: I95305467c17c5c4b75b96dfb06c3c3511eb3f15a
2011-01-17 11:58:30 -08:00
Makoto Onuki c50b6f685b Use broadcast to detect system account update.
Instead of AccountsUpdatedListener.

Bug 3211657

Change-Id: I1e60092fc06fe80b9914ff7264c24fcbfa950745
2011-01-17 11:03:57 -08:00
Marc Blank de196ca3da When syncing folders, read all data first, then process
Bug: 3353035

Change-Id: I80212b225eae48d0351f47f0d601f77578d2fc96
2011-01-14 17:58:15 -08:00
Marc Blank 69af769688 Fix issues w/ security-related account data deletion
* Stop running syncs
* Delete all EmailProvider data except the account itself (with
  cleared sync key) and the account mailbox (necessary for syncing
  to sync after security hold is lifted

Bug: 3245779
Bug: 3253952
Change-Id: Idc208ef5ed85808b085ebab9c26a428fb0451e34
2011-01-09 18:24:35 -08:00
Marc Blank 6f2c724f2f Move onStartCommand processing to worker thread
* Also, reduce service logging

Bug: 3133763
Change-Id: Icc09ddb5966b78350b4485e52a3d8e1f92d9c576
2011-01-05 14:21:13 -08:00
Marc Blank cbdd9f78b2 Distinguish mailbox requests that are user requested
Bug: 3251757
Change-Id: Ie417ebf44c8b740db88e5854077782930359a958
2010-12-31 11:02:03 -08:00
Marc Blank 268597f68d Remove "Heartbeat" logging
Change-Id: Ib15451a9204a40b4bd74c55a348d732c8f43604a
2010-12-28 12:24:07 -08:00
Andy Stadler 2959a7e073 Fix ANRs from Email.setServicesEnabled()
* Create sync & async versions
* Rename all callsites so sync is very apparent
* Fix callsites appropriately
* Clean up interaction between reconciler and setServicesEnabled

Bug: 3133770
Bug: 3134677
Change-Id: Iefbc7814d9aa390baea6345e450e2a4768bf0a9a
2010-12-23 13:19:55 -08:00
Marc Blank b1d511309a Fix typo in ExchangeService
Bug: 3241867
Change-Id: If805196409837bb8e1eeaa2e4ec82c2d1fad2c38
2010-12-01 09:35:45 -08:00
Marc Blank 1b6623b092 Make sure we send callbacks for UI requested syncs
* In the case in which a sync was requested during an already-running
  sync, we weren't passing the request information into the service

Bug: 3143544
Change-Id: I098161830844f604e4aa5b9c067491d2777d78c3
2010-11-29 11:32:04 -08:00
Marc Blank 4238524d6f Remove unnecessary MessageObserver
* We used this to ensure that messages placed in the Outbox would
  trigger a sync, but this is already handled by a call to
  startSync on the Outbox

Change-Id: I90e1b56dd437bbb9e3341bbe4b1ae8245aede891
2010-11-22 17:45:12 -08:00
Marc Blank cf3fb71bc6 Implement password expiration for EAS
* Hoist wipe() method from AbstractSyncParser to AbstractSyncAdapter
* Add deleteAccountPIMData(accountId) to the EmailService API
* Implement deleteAccountPIMData for EAS

Change-Id: I1037cde25fc2b24419f399446cfa0906dc0174d1
2010-11-22 11:17:00 -08:00
Marc Blank ec79508146 Revert "Reuse mailbox cursor unless boxes have changed"
This reverts commit 6c3fa18356.
2010-11-11 10:55:37 -08:00
Marc Blank ad222dc6bb Remove heartbeat logging in ExchangeService
Change-Id: I76be32340811a6a64fb404964d424d881b4db7c5
2010-11-08 13:05:38 -08:00
Marc Blank 6c3fa18356 Reuse mailbox cursor unless boxes have changed
Change-Id: Ic91b1d7bd72e9faf04d3448c1e194663db2c889a
2010-11-08 12:51:55 -08:00
Marc Blank 79ff660aa2 Prevent unnecessary database queries in ExchangeService
Change-Id: Idc3cbc272bd96598b7c7a5de644786bddf1ce03e
2010-11-05 20:35:14 -07:00
Marc Blank 4f1480369c Ensure that finishBroadcast is called in broadcastCallbacks
* An unexpected (runtime) exception during a callback left the
  broadcast unfinished, leading to a fatal exception
* Ensure that we always call finishBroadcast()
* Catch RuntimeException in a broadcast call, so that other calls
  can be executed
* Addresses one of two issues in the referenced bug

Bug: 3142618
Change-Id: I77166bf927560681a2b189906cd687a6e3585223
2010-10-28 17:00:35 -07:00
Marc Blank 13fe88f38d Revert "Fix strict mode violation in maybeStartExchangeServiceThread"
This reverts commit 0e1ffb033a.
2010-10-27 17:13:53 -07:00
Marc Blank dac9c15266 Revert "Correct strict-mode fix CL"
This reverts commit 87a7f84580.
2010-10-27 17:12:49 -07:00
Marc Blank 87a7f84580 Correct strict-mode fix CL
Change-Id: I233b77ec02d0b9519b4dba57458b1b5cf9a97561
2010-10-27 09:32:59 -07:00
Marc Blank 0e1ffb033a Fix strict mode violation in maybeStartExchangeServiceThread
Bug: 3133688
Change-Id: I94d0b6269c6ebffa54f4a0b29689004feccb01d6
2010-10-27 09:01:50 -07:00
Marc Blank d3e4f3ca7e Use notifications for login failures
* For now, clicking on the notification takes the user to the
  Welcome activity, as we don't have final flows for the new
  account setup UI
* Need comment on strings; the problem is that notification
  text must be rather short if we're to use the standard
  notification display.  It looks like newer UI will allow
  3 lines instead of 2, however.
* Tested w/ IMAP, POP3, EAS, and SMTP

Bug: 2322253
Change-Id: I7ed6fa5599179870cbcdb14af062e956eff37ec5
2010-10-27 08:56:37 -07:00
Marc Blank 3afa93c054 Fix remote wipe with mobile sync server
* It appears as if our running multiple sync threads can confuse the
  mobile sync server during a remote wipe (the server expects the next
  client response to be an acknowledgment, whereas it might well be
  a command or response from a different thread)
* To avoid this, we first put the account on security hold and then
  shut down all other sync threads for the account
* After this, we send the acknowledgment and the remote wipe proceeds
  normally.
* NOTE: It's possible that, due to the vagaries of multithreaded
  operation, one of the other syncing threads could still send a non-
  acknowledgment response to the server before our provisioning thread
  gets a chance to send its acknowledgment.  However, since the other
  syncing threads will terminate (and not restart, because of the hold),
  the provision/remote wipe/ack sequence will work on the subsequent
  attempt

Bug: 2844888
Change-Id: Ib4ffbbc67b681e69176b6c1d5515fa80c7d1e121
2010-10-10 16:40:12 -07:00
Marc Blank 07dc502e26 am d04ef0fd: am 5c5f3a0d: Fix issue w/ race condition leading to log spam
Merge commit 'd04ef0fd19e06d6ee2afb39f571b720a28478936'

* commit 'd04ef0fd19e06d6ee2afb39f571b720a28478936':
  Fix issue w/ race condition leading to log spam
2010-10-07 12:21:37 -07:00
Marc Blank 82c944ef3a Remove obsolete EAS logging
Change-Id: I549957c92aa05f98581441c1a7631f87040c5078
2010-09-27 16:38:28 -07:00
Makoto Onuki cc91619b6a Kick syncMailboxStatus callback when syncing Trash/Drafts
Drafts/Trash are not syncable on EAS, but let's kick the callbacks
as the UI is expecting them.

Bug 2989403

Change-Id: I4feac1f0e5471995c14260be6d12329659385e23
2010-09-14 10:43:14 -07:00
Marc Blank fa2386cb11 Don't disable account mailbox when sync freq -> "Never"
Bug: 2905667

Change-Id: I7052281a186534597702fa137a2ecfe8b1280575
2010-09-03 23:31:27 -07:00
Marc Blank 213c52dd64 Fix issues with handling FREQ=YEARLY in RRULEs
* Turns out that we weren't handling one of the cases for YEARLY
  RRULE; that in which the date is specified as a day of week plus
  week of month
* Also, we weren't always sending the INTERVAL properly in a few
  cases
* Fix these issues and add a unit test that confirms the fixes
* Also removed an unused argument in recurrenceParser in
  CalendarSyncAdapter

Bug: 2718948

Change-Id: If9146d484218e7d6bd9f5c2305d0e6a216aeed49
2010-09-02 18:17:42 -07:00
Marc Blank 64b64cca01 Rename SyncManager to ExchangeService
* Updated comments and checked for 100-columns

Change-Id: I4ab5aaa9425714f8e035e1952db3fec63d498ae1
2010-08-27 12:15:56 -07:00