Commit Graph

116 Commits

Author SHA1 Message Date
Daisuke Miyakawa
64545a8ced Make vCard code a separated static library.
- Move the library to a separate directory in framewokr/base, and rename its package from
  android.pim.vcard to com.android.vcard.
- Move all tests for the library under the directory.
- Confirm all tests for vCard are successful.

It would be better for us to have this directory somewhere else (like external/).
But I'll submit this here now and move it to the right place as soon as possible.
From the view of build mechanism, we can do that immediately.

BUG: 2689523
Change-Id: I435e10571b7160bfcc029bed7c37aaac1c6fd69a
2010-05-20 11:25:37 -07:00
Jaikumar Ganesh
26888576f7 Remove duplicate definition of flag.
Change-Id: I9bdcdf5f12677162f0b735a277fce8a75fa13d39
2010-05-13 13:41:37 -07:00
Jaikumar Ganesh
fce9609a18 resolved conflicts for merge of 0de3cc9b to master
Change-Id: I9fcf892de6ebe90c6a4be19d02e3a009ddda89aa
2010-05-13 12:42:59 -07:00
Daisuke Miyakawa
ba2593a424 Add FLAG_RERAIN_PHONE_NUMBER_FORMATTING.
Sometimes using PhoneNumberUtils takes unexpected side effects.
For example, PAUSE mark (#) is removed and operation on the phone number does
not work well in some devices.
I also concern removing the PhoneNumberUtils logic since some other
mobile phones cannot understand # or alphabets and starts emitting errors
after the modification.

I'll add a flag instead of just removing the code and let users choose it.

Bug: 2329952
Change-Id: I4ffdd01ebb8ac320b8b67a5848a747af13c6ad1a
2010-05-10 16:11:21 -07:00
Fred Quintana
a31a945ba6 move favorites and my contacts group handling to the
provider and sync adapter

Change-Id: I768d7407a42a72b24ece8abb1891d050c8b6760e
2010-04-27 12:19:37 -07:00
Daisuke Miyakawa
56374c43f7 vCard refactoring.
Change-Id: Ie6c5e0edae4a13279d5118f0380d863e4ff05727
2010-04-21 16:06:09 +09:00
Daisuke Miyakawa
6db2c6cab5 Refactoring vCard: remove Shift_JIS information from flags.
Change-Id: I34ef498b3312178e7d358b0c8ebc34703abfc771
2010-04-20 18:27:10 +09:00
Daisuke Miyakawa
394026c53e Refactor vCard: clean up test code.
Bug: 2605996
Change-Id: Icdd8f56c1c21af35c55305cb9cc124cbf43174fc
2010-04-20 16:38:49 +09:00
Daisuke Miyakawa
8e798cf71e Refactor vCard: move utilities for unit tests to test_utils directory.
Change-Id: I4ef92633fb5eedc05f13ba53ca4ebc7e3e7ef8ce
2010-04-20 13:08:23 +09:00
Daisuke Miyakawa
c86f0779d6 Make vCard allow users to refrain image export. Useful when
receivers cannot accept image data.

Bug: 2603200
Change-Id: I3c490b2de37ebb2780df4a27a440df3b0afacb3a
2010-04-20 09:53:30 +09:00
Daisuke Miyakawa
931a0a9432 Refactor vCard so that it correctly choose charset while importing
some files.

Change-Id: I27600e260cd7ca42a25481d5ff61f262c9328d61
2010-04-19 18:52:08 +09:00
Daisuke Miyakawa
186bad00b4 Refactor vCard code.
- make the usage of VCardSourceDetector.
- simplyfy flag usage.
- remove unnecessary argument "canceled"

Change-Id: I6dd9723df7230be7478f6817c0ac2e6cbedc6ca7
2010-04-16 11:38:48 +09:00
Fabrice Di Meglio
9d8d1e5dbf Fix bug #2585298 (google calendar sync clears eventTimezone field for recurring allDay events)
- fix RecurrenceSet so that all day recurring events have a UTC timezone set
- code formatting

Change-Id: Iaa622a696d9d995d9921dd721130ef02dc64aa6b
2010-04-12 11:31:04 -07:00
Daisuke Miyakawa
4ac671ad97 Add comments for vCard parser.
Bug: 2576594
Change-Id: I3303a350bdea7b1b84bd1fb318d31ba5a229457d
2010-04-09 14:53:24 +09:00
Daisuke Miyakawa
58b50f86cd Refactor vCard parser so that its implementation detail would be hidden from users.
Move the current implementation or 2.1 and 3.0 to VCardParserImpl_V21 and VCardParserImpl_V30.
- From the view of users, it is strange to make vCard 3.0 inherit vCard 2.1.
- Those two specifications still have similar implementation detail, so make implementation of vCard 3.0 inherits vCard 2.1 makes sense from technical view point.

Now VCardParser_V21 and VCardParser_V30 are independent class.

Remove strict mode in vCard 3.0, since strict parsing is not necessary from the view of actual use, and needs to extra effort to support it.

Bug: 2576738
Change-Id: I1d5cb6cffffb53337faa2dd7c519e7254e12da86
2010-04-08 19:58:58 +09:00
Daisuke Miyakawa
921e5f725f Modify comments.
Bug: 2576594
Change-Id: I7d38bd4c738befddeb4e7ce14ac84032fb764d9d
2010-04-07 19:36:34 +09:00
Daisuke Miyakawa
ea08c40cba Add FLAG_REPRAIN_PHONE_NUMBER_FORMATTING.
Bug: 2329952
Change-Id: I263f581c8146abc372a2cb287e6e61766fefd9b6
2010-04-07 17:32:01 +09:00
Daisuke Miyakawa
82b8b68652 Let vCard importer/exporter select charset.
There are some other bug where charset for import/export is used during vCard handling.

Bug: 2572064
Change-Id: I0aef8a6eba0a7e9263e47368a43dbba05efa91b0
2010-04-06 13:41:27 +09:00
Fred Quintana
d316258285 revert the stripping of System Group:
from the names of google system groups

Change-Id: I677a7abb42a0c3d70d7e7009325f76a4644f1cb1
http://b/issue?id=2558197
2010-04-01 11:43:57 -07:00
Fred Quintana
d5e4fdc8a4 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
 - made AbstractThreadedSyncAdapter.cancelSync not take a thread

Change-Id: I99fde5585bc5f1e95f4873ffbba189074a8d6372
http://b/issue?id=2553539
http://b/issue?id=2553541
http://b/issue?id=2553550
2010-03-30 17:31:52 -07:00
Daniel Lehmann
d62d9eec0d Added a comment to make it clearer that the operation has to be the first
Bug:2521447

Change-Id: I155d0b328115d007116a0fe4560e703647ec2fb5
2010-03-18 16:08:30 -07:00
Daniel Lehmann
7e25f5cbfb Make the VCardEntry more robust against badly behaving resolvers. Additionally make the ImportTestResolver return the right result
Bug:2521447

Change-Id: I39e3e686b1fd75f5e633a467f6ccb736751355ed
2010-03-18 12:56:48 -07:00
Daniel Lehmann
6edcdc1044 Removed compatibility function (was left in before to not break the build)
Bug:2501468

Change-Id: I6b163eb3ce02ed899882d1b6534c1afb6fe1e7c3
2010-03-12 18:36:28 -08:00
Daniel Lehmann
63e914096e Framework changes to allow VCards containing multiple entries
Bug:2501468

Change-Id: I004997c6ed9351e2600e7446615af9e60a14fda8
2010-03-12 13:44:31 -08:00
Daniel Lehmann
b1b1371150 Expose the Uri of the newly created contact
Bug: 2448065

Change-Id: Ie1de3c02981ae471b7772cac289a07f0fc870f31
2010-03-08 15:14:19 -08:00
Daisuke Miyakawa
e8b9ce2293 Merge "Use "My Contacts"" 2010-03-03 18:55:41 -08:00
Daisuke Miyakawa
72d3397b50 Use "My Contacts"
Bug: 2487348
2010-03-04 11:54:45 +09:00
Daisuke Miyakawa
01f4385d86 Handle the string "default" and ignore it appropriately. 2010-03-04 11:01:25 +09:00
Ken Shirriff
a53bbe4033 Remove DateException and obsolete DateUtils functions.
These functions are deprecated and no longer used.
2010-03-01 14:21:13 -08:00
Ken Shirriff
9d06c5876d Unbundling: pull the recurrence string formatting out of EventRecurrence.
A separate change moves it to the calendar app.
2010-02-26 16:45:28 -08:00
Daisuke Miyakawa
0dcb69292e Purge CallLog. 2010-02-24 14:17:15 +09:00
Fabrice Di Meglio
66c5bd9065 Fix bug #2449594 (device should fold RRULEs, etc., that are longer than 75 chars)
also fix a NPE in populateComponent() when Calendar.Events.ALL_DAY property was not defined

Change-Id: Ia5f15755b5af437ee1e661122193f318868ddf6d
2010-02-23 16:15:37 -08:00
Fabrice Di Meglio
24b5bdd29e Fix bug #2331761 (Instances of a recurring event are missing)
by detecting and ignoring malformed recurrences

Change-Id: I4b3aa5db27d8da6616b52fdc7b522d4d92fdc30c
2010-02-18 10:27:37 -08:00
Dmitri Plotnikov
989edfde74 Fixing the use of entities in VCardExporter.
Bug: 2377678
Change-Id: I05768fd2ce28406b1fc32005343fa1eeaaecdd24
2010-02-16 14:40:46 -08:00
Daisuke Miyakawa
103d53645c Make vCard importer use Organization name when there's no other information available.
Some Contacts users are accustomed to use Organization as a name of the contact when the target contact is for some oraginazion like company, etc., so this change makes sense.

Bug: 2310146
2010-02-16 12:33:01 +09:00
Daisuke Miyakawa
51e43a3481 Add error handling codes into vCard composer.
Bug: 2377678
2010-02-15 09:34:32 +09:00
Daisuke Miyakawa
900731de0c Honor '+' in phone export in vCard.
Currently no test because of temporal reason. I'll do in the near future...

Bug: 2417138
2010-02-03 12:42:26 -08:00
Daisuke Miyakawa
50c6668a27 Make vCard importer support lower case params.
Bug: 2339066
2010-01-18 08:30:39 +09:00
Daisuke Miyakawa
9030dd125a Handle null correctly.
Bug: 2353544
2010-01-13 08:31:27 +09:00
Daisuke Miyakawa
1301341f13 Fix test breakage in vCard exporter.
Due to the change Iae8dbac1, all tests for vCard exporeter has failed.
This change fixes the breakage by using a kind of dirty Dependency Injection.

Current test framework for vCard exporter strongly depends on the assumption that
ContentValues objects are able to be directly passed to objects which use
ContentResolver, while the change above disabled the feature by removing
queryEntities().

This change makes VCardComposer forcibly uses queryEntities() via Reflection.
I agree that this change is not so clean, but works fine for now.
2010-01-05 13:44:51 +09:00
Fred Quintana
2ec6c56991 am 328c0e79: - removed the concept of Entity from the ContentProvider APIs - removed the parcelling ability from Entity and EntityIterator and made them public - added an EntityIterator abstract implementation that allow easy wrapping of a Cursor - changed the VCard c
Merge commit '328c0e7986aa6bb7752ec6de3da9c999920bb55f' into eclair-mr2-plus-aosp

* commit '328c0e7986aa6bb7752ec6de3da9c999920bb55f':
  - removed the concept of Entity from the ContentProvider APIs
2009-12-10 10:37:52 -08:00
Daisuke Miyakawa
973afa96bf Add isPrintableAscii() and isPrintableAsciiOnly() to TextUtils.java as hidden methods, and make vCard code use them.
In the future, ContactsProvider will use those methods.
See also the change 34604

Internal issue number: 2275764, 2195990
2009-12-03 15:45:19 +09:00
Daisuke Miyakawa
a750fdd765 Fix a problem in which Android custom fields are not emitted correctly in non-Ascii languages.
Internal issue number: 2195990
2009-11-20 16:13:07 +09:00
Daisuke Miyakawa
639b0f032b Make vCard exporter append neighborhood to locality field instead of extended address,
per China convention.

Internal issue number: 2195990
2009-11-20 07:06:40 +09:00
Daisuke Miyakawa
a6d81e3ee4 Make vCard code refrain from using NEIGHBORHOOD field when importing.
Internal issue number: 2195990
2009-11-19 11:21:39 +09:00
Daisuke Miyakawa
c4b51712d8 Modify vCard exporter code so that it does not emit non-Ascii type.
Also add unit tests.

Internal issue number: 2195990
2009-11-19 09:09:27 +09:00
Daisuke Miyakawa
49c0decf46 Code clean up.
Internal issue number: 2195990
2009-11-18 17:18:53 +09:00
Daisuke Miyakawa
839c036444 Add unit tests.
Internal issue number: 2195990
2009-11-18 10:35:39 +09:00
Daisuke Miyakawa
d2145b97fb Clean up codes and remove/modify stale codes/comments.
Internal issue number: 2195990
2009-11-17 17:12:54 +09:00
Daisuke Miyakawa
1b9e2bec63 Split vCard composer into two parts: VCardComposer and VCardBuilder.
As for VCardBuilder, there was a class with the same name, but this implementation is fundamentally different.
This time, VCardBuilder is like StringBuilder. It enables developers to create their own vCard by themselves.

Make Constants public and rename it to VCardConstants.

Internal issue number: 2242528, 2195990
2009-11-17 14:30:17 +09:00