Commit Graph

61 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 fb3c389a14 Handle upsync of EAS contact "group" (category) rename/delete
Bug: 3211907
Change-Id: I7bec90dae7c223b4bd0d0f366d18cac37e53fbcc
2010-11-23 15:07:48 -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 da0bdb7cec Don't upsync empty contact tags
* EAS 12.0/12.1 don't mind these, but EAS 2.5 objects in some cases
  (title and prefix, certainly)  and the upsync fails
* The error case occurs because the ContentValues provided by
  ContactsProvider actually has a value; the value, however, is an
  empty string
* Prevent this by checking for empty values before serializing

Bug: 2607778
Change-Id: I853ce711024a414f53861720000cc87a7349d660
2010-10-25 12:46:57 -07:00
Marc Blank 517c4f39b7 HTML support for EAS 2.5 email
* Load MIME data for these messages and parse, looking for a body either
  in HTML or plain text or both
* If the MIME data had been trunctated and we can't find text, mark the
  message as partially loaded and load the body text as we did before
  (i.e. get the plain text body); this should be a rare case

TODO: Consider what is testable in the new EmailSyncAdapter code

Change-Id: I00a3066a373a0596431335593de356a4dda7f036
2010-09-15 20:20:15 -07:00
Marc Blank 5a69403c03 Fix issue found by FindBugs
Bug: 2664472
Change-Id: I861d1a1a3f8f6af4cb62c67b6acfb2c03bcba721
2010-05-17 09:17:17 -07:00
Marc Blank 79976209d7 Synchronize getSyncKey/setSyncKey in Calendar and Contacts sync
* When the sync state of Calendar/Contacts is changed, a number of observer calls
  are triggered.  In addition, we might have a running sync.
* The syncKey operations need to be synchronized, because we may otherwise
  inadvertently use stale data when syncing, which would cause symptoms
  as seen in the referenced bug

Bug: 2561864
Change-Id: I03db58fe01c45778d271fad34d8d4940edefe8fe
2010-04-01 17:07:02 -07:00
Marc Blank 53031a59a6 Allow upsync of photo/note deletion for Exchange contacts
* Always send up something when upsyncing photo and note
  fields
* This allows the client to delete the data, as these fields
  are NOT deleted if skipped in an upsync (unlike other
  fields)

Bug: 2558998
Change-Id: I9c874432108eedd84a351918f818c32e6e579dd7
2010-04-01 10:05:01 -07:00
Fred Quintana 1a66cf0056 some changes due to an API review
- make EntityIterator extend Iterator and thus not throw a
   RemoteException, instead converting it into a RuntimeException.
 - rename ActiveSyncInfo to SyncInfo
 - change getActiveSync to getCurrentSync
 - remove the accessors in SyncInfo and instead make the final
   fields publicly accessible

Change-Id: Id1a47bba27042de4c21451a91cc43fa70eb68ec6
http://b/issue?id=2553539
http://b/issue?id=2553541
2010-03-30 17:29:33 -07:00
Doug Zongker 6cec1104fe relocate android.util.base64.* -> android.util.*
b/2553469 - API REVIEW: android.util.base64

Change-Id: I5394427a8e2c94b87ca45a533e417f7088a69f8f
2010-03-29 13:23:39 -07:00
Marc Blank 729b5ca9ba Handle case of typed data with a null type
* There's an NPE if we downsync a contact containing a piece of
  typed data for which there is no type specified in the database
* Check for this and accept "no type" as a match

Bug: 2539843
Change-Id: I155b635a1f9850af9813681f502f3565c3cfcd4b
2010-03-26 17:50:50 -07:00
Marc Blank e4cd885ec4 Handle EAS versions better
* Properly parse the server's supported versions
* Choose the highest server version that we support
* Fail with MessagingException if we don't support any server
  versions

Bug: 2527408
Change-Id: I0a2822c8fab31a65c8fea9b78b4a8c23df1804a3
2010-03-19 12:01:44 -07:00
Marc Blank f8b45d934b Stop calendar/contacts sync in progress when sync setting is turned off
* Syncs in progress weren't checking the getSyncAutomatically setting in
  the account; therefore, a long sync would continue running even though the
  user unchecked the "Sync Calendar/Contacts" box in the settings
* Make the adapters check the flag each time through its sync loop (which
  is currently 5 items); this should cause in-progress syncs to stop within
  a few seconds

Bug: 2185319
Change-Id: Ie181f6de4219ecf27fff58ed59a277ae285622c5
2010-03-01 11:00:20 -08:00
Doug Zongker 33c972e0c6 use the framework Base64 instead of android-common
Change-Id: Ib4f75f66fe8acb1bb5de614bb10e8c938b1d27ef
2010-02-16 09:10:18 -08:00
Doug Zongker f44a40cda1 replace Email's private base64 class with one from android-common
Convert all usages of com.android.email.codec.binary.Base64 to use
com.android.common.Base64 instead, except for Base64OutputStream
(which doesn't exist in android-common yet).

Change-Id: I339a1f451245138187080c7444fcabef8d13f8aa
2010-02-08 20:26:02 -08:00
Makoto Onuki faed6178b1 Move Eas.ACCOUNT_MANAGER_TYPE out of the package.
Moved Eas.ACCOUNT_MANAGER_TYPE to Email.EXCHANGE_ACCOUNT_MANAGER_TYPE.

This constant is not related to the exchange protocol, and referred in
a lot of different places.  Moving it out of the package will make it a lot
simpler when removing exchange dependency.
2010-02-01 15:38:15 -08:00
Fred Quintana 052eefe406 changed to use the new EntityIterator interface 2009-12-09 10:30:58 -08:00
Marc Blank 59da135e15 Allow photo changes to be uploaded to Exchange (fixes #2179082)
Change-Id: I5de51a4313c43dbe4e3d12d4d0e11b20adedaa8f
2009-10-09 14:34:53 -07:00
Marc Blank 1eb0af5d80 Fix NPE issue w/ Contacts sync (#2160417)
* Oversight in late-night submission; simple fix

Change-Id: I0c3ebd4b23c1e913d74e153b3692b3ce8e3c0220
2009-10-01 14:31:24 -07:00
Marc Blank faae6edc55 Fix problem in which email/phone #'s could get erased erroneously
* Fixes #2158960
* Needed to keep track of existing untyped phone/email data

Change-Id: I5e58f092a35253ee785521fad6a2be7f1d2f4d6b
2009-09-30 23:10:57 -07:00
Fred Quintana eddebdf951 use Events for birthdays 2009-09-30 21:22:56 -07:00
Marc Blank 1d0e9e6fb9 Use built-in rows for Birthday and OfficeLocation (fixes #2154423)
Change-Id: I9c6976121c662b5071fb7c86e70ab91d3ae47e53
2009-09-29 13:07:20 -07:00
Marc Blank 3b95f691ee Handle upload of Phone.TYPE_ASSISTANT (fixes #2127721)
Change-Id: Ic59931b9d8643c599c43a164da4b4cfcc36f98c2
2009-09-28 20:41:51 -07:00
Marc Blank 4833cd686f Remove a bit of logging in ContactsSyncAdapter
Change-Id: Id6da45202f0fa0970571a624a89546e90d1bee2c
2009-09-28 17:02:14 -07:00
Marc Blank 3c7c3c0529 Don't send DisplayName to CP2 from Exchange contacts sync
* Should fix #2141888

Change-Id: I31d769fd23de4ec7e2d06f108afd8642700a8500
2009-09-27 12:50:54 -07:00
Fred Quintana db08876316 make EAS set CALLER_IS_SYNCADAPTER for writes 2009-09-20 16:04:13 -07:00
Marc Blank 657de3bfd6 Revert change to AccountManager naming; use email address again
* Forces wipe of existing accounts

Change-Id: I65d08e07a2d74f94f9142e85791d9bf49c100241
2009-09-18 20:48:43 -07:00
Marc Blank 4a72c2e726 Revert very bad commit (strange merge problem)?
* This reverts commit 3f224e7efe.
* Use StructuredName.DISPLAY_NAME for Email display name on upload

Change-Id: Ic11713773d0e5b0db452dce3c9c31680ca45dbf5
2009-09-17 18:58:08 -07:00
Marc Blank 3f224e7efe Use StructuredName.DISPLAY_NAME for Email display name on new contacts
* Fixes #2115514

Change-Id: Ib9c437a1cbcbcf1069692e8d5d17d29e80369418
2009-09-17 10:14:12 -07:00
Marc Blank e7e1ca432e Change AccountManager username for Exchange to the user's login credential
* This is not a backward-compatible change (sorry)
* Existing AccountManager EAS accounts and contacts are deleted
* Existing EmailProvider data is deleted
* Change works with new code (stadler) to avoid account duplication

Change-Id: Ife09c51fa714d91054d017b497bce603add5375a
2009-09-17 10:06:27 -07:00
Marc Blank c022839861 Implement HOME/WORK phones as multiple typed rows
Change-Id: I7e1c885e7735022026df9599babd48f5dbf71af9
2009-09-16 19:57:19 -07:00
Marc Blank 71177c5375 Support StructuredName.DISPLAY_NAME for Exchange contacts
* Fixes #2115514

Change-Id: Iac348c4ecac3bf8f895c32fff7077bc36d385bc9
2009-09-15 14:34:03 -07:00
Fred Quintana 977cd2f58a change to use the new CALLER_IS_SYNCADAPTER flag 2009-09-14 17:37:18 -07:00
Marc Blank c7897acf56 Fix NPE when adding note rows to Contacts
Change-Id: I51574db9abc45b55f8a7c19d493fdc47bc24b11b
2009-09-13 12:04:59 -07:00
Marc Blank 3a0fb3b14e Allow download of contact w/ no name; don't accept empty note
Change-Id: I90058ee6c92853a3765138ca433abd7f62b60c0a
2009-09-11 13:50:45 -07:00
Marc Blank 3c7f0d4c00 Make exchange contact category names visible; also their members
Change-Id: Icaf7c2828db4fda7323b3ec3a6c9cd783ae80c9a
2009-09-11 08:56:34 -07:00
Marc Blank 86ada729c2 Check for null data before writing contact rows to server
Change-Id: Ib7016c43b2655e1753680c511f30cad8f4a1acce
2009-09-11 07:56:03 -07:00
Marc Blank 058df979c8 Fix sync-crashing bug in exchange contact groups
Change-Id: I40335dcbba9653778d8376b26ae9c2455c34d0ee
2009-09-10 15:53:37 -07:00
Marc Blank ffe998914d Remove temporary code that disabled contacts upsync
Change-Id: I41273aeac3059a49a1fffc7904e580a8544724bf
2009-09-09 22:38:05 -07:00
Marc Blank 009fd35e92 Rework ContactsSyncAdapter to handle untyped Email and IM data
* This is required to due a change in ContactsProvider2 that removes
  type information for these fields

Change-Id: I993aebdcace0e1db538a85afdea3389fe41518d8
2009-09-09 11:08:35 -07:00
Marc Blank 65652eee27 Put in temporary code to prevent contacts upsync based on Gservices setting
Change-Id: I89ae0495da9daa85aee7e411cf159fd3c010ee13
2009-09-02 15:32:02 -07:00
Marc Blank 469d07fdd4 Use bulk delete for wiping contacts, now that it's implemented in ContactsProvider
Change-Id: I0363901902cc8c17116222eb78bacd2e96ad28d7
2009-08-31 21:43:54 -07:00
Marc Blank 617720eb35 Handle user deletions in Exchange Contacts sync (i.e. upsync them)
Change-Id: I94a8d83b4739b6439a7a87c0bf22ed165a9c9186
2009-08-29 20:09:52 -07:00
Marc Blank 58267fe146 Fix some Contacts upsync bugs; add logging for serialization
Change-Id: I855a8ee3df520f53fc94866b8463d314cf800ca5
2009-08-28 16:37:29 -07:00
Marc Blank f8a81b94a3 Set ContactsProvider Settings so that ungrouped Exchange contacts display by default
Change-Id: Ie7ede23efdd371816c8dc190b8269abd83c5f238
2009-08-27 11:00:59 -07:00
Marc Blank 04e3ba8ffd Move some Contacts fields to new CommonDataKinds rows 2009-08-25 15:00:15 -07:00
Marc Blank aa69a17477 Add initial support for uploading new Contacts to Exchange server
* Refactor the sync adapters to separate out parsing from commit
* Use ContactsProvider to save the SyncKey for contacts
* Fixes #2072664 and #2072456

Change-Id: I1e85c498496e83d9523489636a75f366f7fbd106
2009-08-24 18:45:14 -07:00
Marc Blank bfe94e6eaa Fix NPE when trying to upload a Contact created on device
* Note: This functionality isn't yet implemented

Change-Id: Ie5840a6830e31acc72523b9e8d6d760bf26d523f
2009-08-23 01:24:49 -07:00
Marc Blank 6b52af214c Implement adaptive ping timeout; release wake lock waiting for connectivity
* Remove unused/duplicated classes (e.g. Base64, WbxmlSerializer, etc.)
* Code cleanup in AbstractSyncService, EasSyncService
* Remove last references to HttpURLConnection (using HttpClient now)
2009-08-16 16:40:42 -07:00
Marc Blank 1ba0fd37a1 Cleanup; delete unused files, change log statements
* Two files were unused and therefore deleted
* userLog was changed to avoid using string concatentation until the logging
  decision is made
2009-08-13 11:30:39 -07:00