History log of /frameworks/opt/vcard/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9e87c7606b0593b6789cdd177d80e31b991c864c 21-Aug-2012 Chiao Cheng <chiaocheng@google.com> Allowing multiline addresses to support microsoft vCard.

Multiline addresses are not allowed in vCard 2.1 but it has been encountered
in microsoft mobile vCard. This adds support for this by checking the next
line. If the next line contains a colon, we assume it's a new property.
Otherwise, we assume it's a continuation.

Bug: 5188556
Change-Id: I4607eda901a1d535c759b5026f6702eb47290cb8
ava/com/android/vcard/VCardParserImpl_V21.java
ests/res/raw/v21_adr_multiple_line.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
2c9cf383b1c956c7185e97c2417ebd85b48fc0ac 15-Aug-2012 Chiao Cheng <chiaocheng@google.com> Making vcard photo parsing more robust to decode errors.

Base64.decode throws IllegalArgumentException which is not handled
and results in crash reports for users. Switching to VCardException
which should have better UI handling.

Change-Id: I3fa12b8a703c3eed181caade0bfda2271435b377
ava/com/android/vcard/VCardParserImpl_V21.java
ests/res/raw/v21_malformed_photo.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/testutils/VCardVerifier.java
a4e576ce8ebf869c505f0fe0ea82faefae9940f8 15-Aug-2012 Chiao Cheng <chiaocheng@google.com> Fix for malformed photo entry.

Blackberry vcard photo entry is not terminated with standard vcard 2.1
terminator. The vcard code is suppose to handle this irregularity already
but there was a bug where it would not work unless the next entry contained
a ':' right after the property name (i.e. "END:VCARD"). Cases with next
entries such as "TEL;TYPE=CELL:" was missed. Note the ":" is not right after
TEL.

Bug: 6979337
Change-Id: Ifa3dbb377b9da97ef7570c0f8eca8a1cb5e727a9
ava/com/android/vcard/VCardParserImpl_V21.java
ests/res/raw/v21_blackberry_photo.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
449d710428682b3f44ba20ce290564cd9352ca0a 28-Nov-2011 Daisuke Miyakawa <dmiyakawa@google.com> Handle "VOICE" type as OTHER on Android

vCard's "VOICE" type is the default type used in the format, while
OTHER is the default type on Android. Our exporter treats Android's
OTHER type as vCard's "VOICE", while our importer accepts
the default type "VOICE" as Android's CUSTOM type with "VOICE" label,
which confuses users: when they transfer phone numbers with OTHER type
those numbers become "VOICE" on receiver sides.

Bug: 5600504
Change-Id: Id30d2ca9b67b81798565224b881a734e8ee76516
ava/com/android/vcard/VCardUtils.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
5fffd2ba2d7fc22271251251f89043ab345acd74 19-Sep-2011 Daisuke Miyakawa <dmiyakawa@google.com> Allow vCard users to format phone numbers by themselves

Bug: 5348938
Bug: 4177894
Change-Id: Iff9461d8c71c5800b0731c3708867003d75bb395
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardComposer.java
ava/com/android/vcard/VCardConfig.java
ava/com/android/vcard/VCardPhoneNumberTranslationCallback.java
846712bf3921bec5f0654f68e95df790b398acd5 13-Sep-2011 Martijn Coenen <maco@google.com> Add API for setting the raw contacts URI.

Needed for when we are building vcards for a profile contact.

Bug: 5300714
Change-Id: Ib4adc54d525ffaffe4d8955f4ba894d1a315099d
ava/com/android/vcard/VCardComposer.java
95e66b00988bc16ecc17df31e47c873b2554b8cc 17-Aug-2011 inshik <inshik.shin@samsung.com> Bluetooth : Modify build & parse vcard

If the contacts have "p"or "w" instead of "," or ";" when some carkits
are receiving them from andro id OS, some catkits cannot parse the
contacts.

Bug: 5178723
Change-Id: I536ca57aff561fb0637448bcddfd53a6ba8b28ef
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardEntry.java
ests/res/raw/v30_pause_wait.vcf
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
5f0f9e9f2d3e8b73beaf49d542e10fdec6fa199b 21-Jun-2011 Martijn Coenen <maco@google.com> Relax URI checking on VCardComposer.

URI may be extended with additional query parameters
(e.g. user profile).

Change-Id: Ie5ef1ca76709df26609960c12826668afb75ce21
ava/com/android/vcard/VCardComposer.java
87315f4cddec4c9bb09a48497c8b6bd65a8b99c7 05-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Make local variable for photo private.

Need I2ef49fde19549da6515b6a7c9a6953fa8834cbaf

Bug: 4066223
Change-Id: I75e87b66268b817b78d9a6f093872ddac9466ff2
ava/com/android/vcard/VCardEntry.java
5a708740cf128604d53da3fcf6d0ad92dd913f98 05-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Add hashCode()."
79a36630866f4747b6384aac94c2553004d91ec6 05-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Remove VCardInterpreterCollection"
517540b6e3903371def5eb4ca44c2bb2ff91ae30 05-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Add hashCode().

Bug: 4066223
Change-Id: I917761014753605ee06f53cbc6499ca9fe9a7956
ava/com/android/vcard/VCardEntry.java
9ec6c05a1dbb17862a44f96e91975dfc01cebf6e 01-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Remove VCardInterpreterCollection

Bug: 4066223
Change-Id: I712d35582bf054e70ad2406256a57a4ee1381905
ava/com/android/vcard/VCardInterpreterCollection.java
ests/src/com/android/vcard/tests/testutils/VCardVerifier.java
56650608f09fc75f260c03e00456ef3d1e60c929 01-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Add parseOne() capability.

Bug: 4066223
Change-Id: I1699dd073a3b9647a5654d3fea4a2963430599da
ava/com/android/vcard/VCardParser.java
ava/com/android/vcard/VCardParserImpl_V21.java
ava/com/android/vcard/VCardParser_V21.java
ava/com/android/vcard/VCardParser_V30.java
ava/com/android/vcard/VCardParser_V40.java
ests/src/com/android/vcard/tests/VCardInterpreterTests.java
ests/src/com/android/vcard/tests/VCardParserTests.java
ests/src/com/android/vcard/tests/VCardTestRunner.java
1de396f6df89363169d3a2e61a61fa98d12c1ef8 23-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Refactor code

1) introduce VCardProperty and make use of it everywhere

Previously we had had two structures for it:
VCardParserImpl_V21.PropertyData and VCardEntry#Property.
The former was for holding raw data for property, while
the latter was for holding resultant (encoded) values.
Apparently we can share same structure.

To do so, we need to let VCardInterpreter pass the
structure to interpreter side, instead of splitting them
into smaller pieces by using several propertyXXX() calls.
Thus this change introduces onPropertyCreated(VCardProperty)
in lieu of propertyXXX().

Now vCard parser side is responsible for encoding
Quoted-Printable, BASE64, and several charsets.
Users are still able to do them manually by using
VCardEntry#getRawValue().

2) add better handling for data inside VCardEntry

Now VCardEntry has so many fields that it is harder to
iterate those data, while the iteration itself is common
use case for it. At least three functionalities are
now using iteration: toString(), isEmpty(), and
constructInsertOperations().

This change introduces inner iterator functionality.
VCardEntry.EntryElementIterator allows users to implement
their own iteration logic.
VCardEntry#iterateAllData(VCardEntry.EntryElementIterator)
iterates all data inside VCardEntry and pass them into
the inner iterator.

3) make VCardParser abstract class

VCardParser should provide some utility functionality like
VCardParser#getInstance(), while currently users have to
choose one of inherited classes like VCardParser_V21, which
is hindering encapsulation.

Currently no external library implements VCardParser,
so this change isn't so harmful.

Bug: 4167593
Bug: 4066223
Change-Id: Ic6bb453cf733cf1de356789b36dd90521dceff56
ava/com/android/vcard/VCardEntry.java
ava/com/android/vcard/VCardEntryConstructor.java
ava/com/android/vcard/VCardEntryCounter.java
ava/com/android/vcard/VCardInterpreter.java
ava/com/android/vcard/VCardInterpreterCollection.java
ava/com/android/vcard/VCardParser.java
ava/com/android/vcard/VCardParserImpl_V21.java
ava/com/android/vcard/VCardParserImpl_V30.java
ava/com/android/vcard/VCardParser_V21.java
ava/com/android/vcard/VCardParser_V30.java
ava/com/android/vcard/VCardParser_V40.java
ava/com/android/vcard/VCardProperty.java
ava/com/android/vcard/VCardSourceDetector.java
ava/com/android/vcard/VCardUtils.java
ests/res/raw/v21_android_custom_prop.vcf
ests/res/raw/v40_sip.vcf
ests/src/com/android/vcard/tests/VCardEntryTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/VCardInterpreterTests.java
ests/src/com/android/vcard/tests/testutils/ImportTestProvider.java
ests/src/com/android/vcard/tests/testutils/ImportTestResolver.java
ests/src/com/android/vcard/tests/testutils/PropertyNodesVerifier.java
ests/src/com/android/vcard/tests/testutils/VNode.java
ests/src/com/android/vcard/tests/testutils/VNodeBuilder.java
56174dfd0654acbe828e4db38537ec5a3a04d466 17-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> remove legacy code.

- remove createOneEntryLegacy()
- remove OneEntryHandler

Should be after
- I3c5a58fef5a404b992a3c17578eeb63518294231
- Ie1eb516a8163febd4438e19df5bc0892726942cb
- Ie21c8966b0bb5b73b3afd18bfe7c142b523413c4

Bug: 4066223
Change-Id: Id623814e8f5961aaf9cf9b4dcc92f75ace401148
ava/com/android/vcard/VCardComposer.java
ests/src/com/android/vcard/tests/testutils/ExportTestProvider.java
ests/src/com/android/vcard/tests/testutils/VCardVerifier.java
f9d4914c962a87d525238e56d062bdc0f99521ae 25-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> am a07bb8c5: (-s ours) Use correct backReferenceIndex in postal addresses

* commit 'a07bb8c56b732e319a3d2d48703d4b3c204ea2cc':
Use correct backReferenceIndex in postal addresses
a07bb8c56b732e319a3d2d48703d4b3c204ea2cc 25-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Use correct backReferenceIndex in postal addresses

DO NOT MERGE.

Bug: 4167593
Change-Id: Ia656336a78e7424d7055a1c22b54fa8d13adc461
ava/com/android/vcard/VCardEntry.java
ava/com/android/vcard/VCardUtils.java
48dd8e86a81d2ab40eb762975c8211c225002bf0 22-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Tolerate nested vCard.

vCard 2.1 requires to handle nest (or grouping) while our
parser has not supported it well.

One support we have had is ignoring top element when
FLAG_TORELATE_NEST is specified, which isn't appropriate.

e.g.
BEGIN:VCARD
X-VENDER-SPECIFIC-META-INFO:XXXX
...
BEGIN:VCARD
(Actual content)
END:VCARD
END:VCARD

This change lets the vCard lib import nested vCard.

One problem around handling the case above is that, after
having this change, we'll get two vCard elements instead of
one, as the top element isn't ignored on parser level any more,
while we don't want the top-level data. To solve the problem,
this change also makes vCard importer ignore such empty data.

This changes just flattens nested vCard. Caller needs to take
care of grouping/nest case using VCardEntry#getChildren()
if it wants to support grouping feature.

- introduce "children" into VCardEntry, which enables users to
handle nested vCard on their side.
- make vCard parsers accept nest cases.
- make vCard interpreters handle nest cases.
- make VCardEntry ignore empty data during constructing insert
opertions.
- make tests accept nest cases.
- add additional test cases for verifying more details.
- add debug string capability.
- remove codes for performance measurement.

Bug: 4066223
Change-Id: Id8af659c2cc0bb0db59c8de239d9d95e9d440089
ava/com/android/vcard/VCardConfig.java
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardEntry.java
ava/com/android/vcard/VCardEntryConstructor.java
ava/com/android/vcard/VCardEntryHandler.java
ava/com/android/vcard/VCardInterpreter.java
ava/com/android/vcard/VCardParserImpl_V21.java
ava/com/android/vcard/VCardParserImpl_V30.java
ava/com/android/vcard/VCardParser_V21.java
ava/com/android/vcard/VCardSourceDetector.java
ests/res/raw/v21_nest.vcf
ests/src/com/android/vcard/tests/VCardEntryTests.java
ests/src/com/android/vcard/tests/VCardImporterNestTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/VCardInterpreterTests.java
ests/src/com/android/vcard/tests/VCardTestRunner.java
ests/src/com/android/vcard/tests/testutils/ContentValuesVerifierElem.java
ests/src/com/android/vcard/tests/testutils/ImportTestProvider.java
ests/src/com/android/vcard/tests/testutils/PropertyNodesVerifier.java
ests/src/com/android/vcard/tests/testutils/VCardVerifier.java
ests/src/com/android/vcard/tests/testutils/VNode.java
ests/src/com/android/vcard/tests/testutils/VNodeBuilder.java
403c83bde6d05e6325e99eb89924f0a09e5df3bb 11-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Use same TAG in vCard"
02117b3d19787ff65486b9f9db8abd338ae4c9f9 11-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Use same TAG in vCard

Tiny cleanups are included

Bug: 4066223
Change-Id: I0b121e93ea5c624325d44b8aa6bab42d9a9a24fb
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardConfig.java
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardEntry.java
ava/com/android/vcard/VCardEntryCommitter.java
ava/com/android/vcard/VCardEntryConstructor.java
ava/com/android/vcard/VCardParserImpl_V21.java
ava/com/android/vcard/VCardParserImpl_V30.java
ava/com/android/vcard/VCardParserImpl_V40.java
ava/com/android/vcard/VCardSourceDetector.java
ava/com/android/vcard/VCardUtils.java
8ed6de732dfb8bf8257152e5c5faf7e0ee760464 10-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> replace newer composeOneEntry method with older one.

Apparently forcing users to use OneEntryHandler
every time doesn't make sense. onInit()/onTerminate()
capability can be implemented as users' preferance and
shouldn't be mandatory. Just returning real vCard
Strings would be more preferable.

This breaks current API. We need additional
modifications to three packages.
- Ibaafdf4e0e1e01713b721d216102ae711db7ba74
- Icca2019b10fc84e437efbc2606cd5703b3ea0a5f
- I2667a91d90b1ce985a354a5a37de75bb8156cff8

Bug: 4066223
Change-Id: I91b65f881e1712ecf82c2e119a92bc70c43c623c
ava/com/android/vcard/VCardComposer.java
ests/src/com/android/vcard/tests/testutils/VCardVerifier.java
677ef21613a9d35053ec098444832ce4125a847e 08-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Reorganize codes, especially around vCard composition.

- suppress misc warnings
- stop using VCardException in vCard composer which has been
used only in test context
- add VCardComposer#createOneEntryNew(). I'm planning to replace
this with old VCardComposer#createOneEntry()
I don't understand why we have callback mechanism for this kind of
simple stuff. I could have been better on this.
- add some documentation
- mark initWithRawContacsEntityUri() (introduced recently) as
deprecated. That was not a good idea =(

Bug: 4066223
Change-Id: Ib533a435cac3b4e4fa31527d02b0657fc4bd0377
ava/com/android/vcard/VCardComposer.java
ava/com/android/vcard/VCardEntryCounter.java
ava/com/android/vcard/VCardInterpreterCollection.java
ava/com/android/vcard/VCardParserImpl_V21.java
ava/com/android/vcard/VCardSourceDetector.java
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/VCardJapanizationTests.java
ests/src/com/android/vcard/tests/VCardTestUtilsTests.java
ests/src/com/android/vcard/tests/test_utils/ContactEntry.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesBuilder.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesVerifier.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/ExportTestProvider.java
ests/src/com/android/vcard/tests/test_utils/ExportTestResolver.java
ests/src/com/android/vcard/tests/test_utils/ImportTestProvider.java
ests/src/com/android/vcard/tests/test_utils/ImportTestResolver.java
ests/src/com/android/vcard/tests/test_utils/LineVerifier.java
ests/src/com/android/vcard/tests/test_utils/LineVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/PropertyNode.java
ests/src/com/android/vcard/tests/test_utils/PropertyNodesVerifier.java
ests/src/com/android/vcard/tests/test_utils/PropertyNodesVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/VCardTestsBase.java
ests/src/com/android/vcard/tests/test_utils/VCardVerifier.java
ests/src/com/android/vcard/tests/test_utils/VNode.java
ests/src/com/android/vcard/tests/test_utils/VNodeBuilder.java
ests/src/com/android/vcard/tests/testutils/ContactEntry.java
ests/src/com/android/vcard/tests/testutils/ContentValuesBuilder.java
ests/src/com/android/vcard/tests/testutils/ContentValuesVerifier.java
ests/src/com/android/vcard/tests/testutils/ContentValuesVerifierElem.java
ests/src/com/android/vcard/tests/testutils/ExportTestProvider.java
ests/src/com/android/vcard/tests/testutils/ExportTestResolver.java
ests/src/com/android/vcard/tests/testutils/ImportTestProvider.java
ests/src/com/android/vcard/tests/testutils/ImportTestResolver.java
ests/src/com/android/vcard/tests/testutils/LineVerifier.java
ests/src/com/android/vcard/tests/testutils/LineVerifierElem.java
ests/src/com/android/vcard/tests/testutils/PropertyNode.java
ests/src/com/android/vcard/tests/testutils/PropertyNodesVerifier.java
ests/src/com/android/vcard/tests/testutils/PropertyNodesVerifierElem.java
ests/src/com/android/vcard/tests/testutils/VCardTestsBase.java
ests/src/com/android/vcard/tests/testutils/VCardVerifier.java
ests/src/com/android/vcard/tests/testutils/VNode.java
ests/src/com/android/vcard/tests/testutils/VNodeBuilder.java
7e4e86eb5ad2c8a68ca7005ef4dee64a82ce0198 03-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Tiny refactoring, clean up.

- isolate test-related stuffs
- suppress warning
- let constructor accept ContentResolver, which is
useful when test has custom ContentResolver apart from
Context object.
- prohibit multiple init() calls

Change-Id: I0da5af56bf04e8eafbef376668a09002cb62d3f5
ava/com/android/vcard/VCardComposer.java
ests/src/com/android/vcard/tests/test_utils/ExportTestProvider.java
ests/src/com/android/vcard/tests/test_utils/ExportTestResolver.java
ests/src/com/android/vcard/tests/test_utils/VCardVerifier.java
a11303ccb430ca40210900823807027cc842bf6c 03-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Make vCard available without hidden APIs.

Must be with I4b529a8805b1b0e219c16e93242b102659e8f2e7

Bug: 3143497
Change-Id: I0f90270fb13d13f56b70a07638271b22a065cedd
ndroid.mk
ava/com/android/vcard/VCardComposer.java
91ff68b93f7a623f168697ebdb895daea3542579 22-Feb-2011 Daisuke Miyakawa <dmiyakawa@google.com> Refrain wrong Writer#flush() call.

- We cannot rely on finilizer ordering: FileOutputStream may be
released before HandlerForOutputStream
- Writer#flush() call in finalizer may lock file system for a long time
(10> secs), which will let the VM assume there is deadlock
- Writer#flush() will be called from Writer#close() so we don't need
to call it explicitly.
- There's a race condition between VCardComposer.finalize()
and FileOutputSteram.finalize() since they may be called
concurrently.
- Use CloseGuard for detecting missing terminate() call.

Change-Id: I1ddcaf2c4564476e81dc67d3ec6ec1c947872a84
ava/com/android/vcard/VCardComposer.java
f98084b727f30713a31ace82e63341a4fa2ae5d7 16-Feb-2011 Daisuke Miyakawa <dmiyakawa@google.com> Reduce the number of applyBatch() call

Bug: 3435697
Change-Id: I89b13097638407cc700f2faafd201cc142e4f9e0
ava/com/android/vcard/VCardEntry.java
ava/com/android/vcard/VCardEntryCommitter.java
9919ad2126c06dbf2eb54a11e6158f87f316bc22 10-Feb-2011 Daisuke Miyakawa <dmiyakawa@google.com> Stop using private APIs as much as possible.

- remove CharsetUtils stuffs
- remove private APIs in PhoneNumberUtils/TextUtils.

We keep the hidden flag "Data.FOR_EXPORT_ONLY", so this code still
needs access to private API. We don't remove it right now since we
may still need it while we confirmed that the other stuffs are "ok"
to be removed. Some more investigation will be needed in the future
to remove the flag.

Bug: 3143497
Change-Id: I074a7798d2208c3e14a524bd5f307a91ac50f735
ndroid.mk
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardComposer.java
ava/com/android/vcard/VCardEntry.java
ava/com/android/vcard/VCardEntryConstructor.java
ava/com/android/vcard/VCardUtils.java
da2f6ef422b360827f2c5231552d8c9fad0ed8b1 23-Jan-2011 Daisuke Miyakawa <dmiyakawa@google.com> Let the lib use properties in 4.0 rev 15

Change-Id: I048614aef9ec32cb124d057693dfe6d037a2223e
ava/com/android/vcard/VCardComposer.java
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardParser_V40.java
c955c8b0da0c9fcbad0ddcae76641358c27e72cd 10-Jan-2011 Daisuke Miyakawa <dmiyakawa@google.com> Handle a case BASE64 doesn't contain two CRLFs

Although BASE64 must contain two CRLFs at its end, sometimes
we encounter the case where it doesn't. This change handles
it if possible.

Bug: 3330767
Change-Id: Ibe2be216a25fe1047034be1fdb17bb5d35ed1b5f
ava/com/android/vcard/VCardParser.java
ava/com/android/vcard/VCardParserImpl_V21.java
ava/com/android/vcard/VCardParser_V21.java
ava/com/android/vcard/VCardParser_V30.java
ests/res/raw/v21_base64_no_2_crlf.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
00b4b98ea94df7fa3f88ee9a623d60db0d4fc451 18-Nov-2010 Daisuke Miyakawa <dmiyakawa@google.com> Handle custom labels correctly.

Previous implementation uses upper-case strings instead of original
expressions in vCard, so "X-Custom" becomes the custom type "CUSTOM"

Add test case for this fix.

Bug: 3207011
Change-Id: I287fd595a80453e18b2bb57600ea8d0bd8b78ffd
ava/com/android/vcard/VCardEntry.java
ava/com/android/vcard/VCardUtils.java
ests/res/raw/v21_x_param.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
8bde974dac0ef49da5fda52da09952ebb4b5fd89 16-Nov-2010 Daisuke Miyakawa <dmiyakawa@google.com> Suppress inappropriate log around VCardBuilder.

No primary/subprimary ContentValues just means there's no
ContentValues with StructuredName in a given list, so the
log tells completely wrong message to us.

Bug: 3202342
Change-Id: I5a151e850fad9335f2396cfd9edf0750e64462d4
ava/com/android/vcard/VCardBuilder.java
b23043e3a199e951817b6d86c301b9521d4c26fe 03-Nov-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add logs to track the parser behavior.

Bug: 3159855
Change-Id: Idee28c6cfb05bab0079aa755f402843da3d746bd
ava/com/android/vcard/VCardParserImpl_V21.java
2c4b5f3a9df3eff8ed8a7b3d2dc7739277e07d41 28-Oct-2010 Daisuke Miyakawa <dmiyakawa@google.com> Remove dependency toward org.apache.commons.codec.net.

Bug: 3143497
Change-Id: Ibef852372875e5762576899bbcc61c37c8fd9331
ava/com/android/vcard/VCardUtils.java
37634a0179f74431317f50d2ce493e3fad36f5a9 21-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Modify vCard importer/exporter around sip handling

Bug: 2985401
Change-Id: I8216dd80bcb09669be807dd92452e69fe2a11a65
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardEntry.java
ests/res/raw/v40_sip.vcf
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
a7cff0a3bfc08867f3aa7998524f93ea5824549e 15-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add RAW_CONTACT_ID for refraining NPE.

BUg: 3004082
Change-Id: I4eda4b6ca019141091c422e81c02a2abc314b0b3
ava/com/android/vcard/VCardEntry.java
8c1cdbbccd5169122c183f6fbfd4436faacf2a1d 13-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add FLAG_REFRAIN_IMAGE_EXPORT support.

Bug: 2603200
Change-Id: I033a195e1d6860dda149eae14f81f1e02a73b200
ava/com/android/vcard/VCardComposer.java
ava/com/android/vcard/VCardConfig.java
465aa5d5706ba56c74c1249a17a6df80b0f42972 09-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Fix TEL type support.

vCard 4.0 says it "is" URI, while it is phone number in vCard 3.0.

Change-Id: I4533c6a013e3dc8fdd8d5bcae2f7fb55300039dc
ava/com/android/vcard/VCardBuilder.java
ests/src/com/android/vcard/tests/VCardExporterTests.java
0fc278de46840f89c01aa984de7565c1f97e3103 08-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Make vCard importer for 2.1 remove "sip:" at the top of address.

Change-Id: Ifba934d2c0458f20ed23b315ffa17f5838fd284a
ava/com/android/vcard/VCardEntry.java
ests/res/raw/v21_sip.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
5db8b7baeffb35191032789cb0b0d643b78f0120 08-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add import/export support for SIP with vCard 2.1.

There's no regitimate field, so X-SIP is used. Maybe there are
other properties available for SIP.

Bug: 2969777
Change-Id: Ib085d39488e38d4090b6eb8003a00842831c3a53
ava/com/android/vcard/VCardEntry.java
ests/res/raw/v21_sip.vcf
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
422643669a44d08ca8b22a73286fae988a288b0e 08-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add SIP export support for vCard 3.0 and 4.0.

Change-Id: I5adc7d375b79c8ae9671938c78f9bdc57075aa28
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardComposer.java
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardParser_V30.java
ests/src/com/android/vcard/tests/VCardExporterTests.java
88d0f1ef715f2e1209eba5d175b1b71c556fa8b0 05-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add SIP support for vCard 3.0.

Change-Id: I48b7057dc802c37936e31fbe95798af6b2c06a5b
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardEntry.java
ests/res/raw/v30_sip.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/test_utils/ImportTestProvider.java
06ae82316d0b5f7222a7a1d15b7d03df88fdea15 24-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Fix vCard importer so that it imports IM correctly.

Bug: 2944990
Change-Id: I9aba68f03569b9288c4286b73bf3e4e4b84e6d1a
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardEntry.java
ests/res/raw/v21_im.vcf
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
3d77102a83d0e412046ca0ff9dfdef1a44050ca3 23-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add tests for vCard 4.0 and fix some of existing logics.

Bug: 2794181
Change-Id: I1cd8550f0ff096a2acb12fcc41dc7235251b09ea
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardUtils.java
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardUtilsTests.java
ests/src/com/android/vcard/tests/test_utils/PropertyNodesVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/VCardVerifier.java
36ba003879c5583609af3afcec8df22f51d94cd3 23-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add tests for vCard 4.0.

Change-Id: I29b26d9bc661238404de2e9d9bdfebf9035e05ed
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardConfig.java
ests/AndroidManifest.xml
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/test_utils/VCardVerifier.java
237dd947f2e22d34f490bf35ef4b850d05cfffa9 21-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Misc fix for vCard testing.

- Add VCardTestRunner
- Make AndroidManifest aware of newly added VCardTestRunner
- Move VCardTestBase to test_utils as it is part of testing utility
- Add VCardTestUtilsTests, confirming test utility correctly fails when
the test should fail.

Change-Id: I593912ce9e664e9346d6f567ccf75f8afc47f9a5
ests/AndroidManifest.xml
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/VCardJapanizationTests.java
ests/src/com/android/vcard/tests/VCardTestRunner.java
ests/src/com/android/vcard/tests/VCardTestUtilsTests.java
ests/src/com/android/vcard/tests/VCardTestsBase.java
ests/src/com/android/vcard/tests/test_utils/VCardTestsBase.java
4560bdde6dd75cca49fc55b58aafb5d416b88ca3 20-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Make vCard 4.0 parser support SORT-AS parameter.

Add unit test for it.

Fix bugs in foundation classes..

Change-Id: I8b5ca1fd49ef3e729ec85429fb8110efde5091f1
ava/com/android/vcard/VCardConfig.java
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardEntry.java
ava/com/android/vcard/VCardParserImpl_V21.java
ava/com/android/vcard/VCardParserImpl_V30.java
ava/com/android/vcard/VCardParserImpl_V40.java
ava/com/android/vcard/VCardParser_V40.java
ava/com/android/vcard/VCardUtils.java
ests/res/raw/v40_sort_as.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/VCardTestsBase.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesBuilder.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesVerifier.java
ests/src/com/android/vcard/tests/test_utils/ImportTestProvider.java
ests/src/com/android/vcard/tests/test_utils/PropertyNodesVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/VCardVerifier.java
a76f41e328f31c2e9e9006160d8f65fe651eeb6a 21-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Fix foundation classes for vCard importer/exporter.

A lot of tests are not actually tested =(

Change-Id: Iea873573e8aced9660be9bf8d7900d85c9c68380
ava/com/android/vcard/VCardInterpreterCollection.java
ava/com/android/vcard/VCardParserImpl_V30.java
ests/res/raw/v30_comma_separated.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesVerifier.java
ests/src/com/android/vcard/tests/test_utils/PropertyNodesVerifier.java
ests/src/com/android/vcard/tests/test_utils/PropertyNodesVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/VCardVerifier.java
1680191a2a208fd61123810a88ce9def83e222ba 19-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Make foundation classes public.

Without making public, runtime cannot see the classes and induces
unexpected errors.

Bug: 2832816
Change-Id: Ifaefaca9364eff9027cde78b0144c08219e8831e
ests/src/com/android/vcard/tests/VCardTestsBase.java
ests/src/com/android/vcard/tests/test_utils/ExportTestProvider.java
ests/src/com/android/vcard/tests/test_utils/ExportTestResolver.java
ests/src/com/android/vcard/tests/test_utils/ImportTestProvider.java
ests/src/com/android/vcard/tests/test_utils/ImportTestResolver.java
ests/src/com/android/vcard/tests/test_utils/VNodeBuilder.java
5f363a8136349b242d243c3c0c14e6d5a065d23f 18-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Code clean-up: remove warnings around TestCase usage.

We don't need TestCase object but need AndroidTestCase anyway,
so verifiers accept AndroidTestCase object, which is often
dropped silently.

Change-Id: I9bd45dd1d2481ccc8b95e62ea62c5e014f1d7057
ests/src/com/android/vcard/tests/test_utils/ExportTestProvider.java
ests/src/com/android/vcard/tests/test_utils/ExportTestResolver.java
ests/src/com/android/vcard/tests/test_utils/ImportTestProvider.java
ests/src/com/android/vcard/tests/test_utils/ImportTestResolver.java
ests/src/com/android/vcard/tests/test_utils/LineVerifier.java
ests/src/com/android/vcard/tests/test_utils/LineVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/PropertyNodesVerifierElem.java
58ca5f9943bb5c8aeeab3150ac96f1143dfd86ba 18-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add a few tests confirming the behavior of vCard library.

Fix test code as it doesn't convert multi-byte params to
UTF-8 properly.

Modified the content of v30_commpa_separated.vcf, as
the original intent of the file is not realistic
(I've never seen this kind of complicated form).
Also, without successfully parsing it, we torelate it.

Added comma-separated-types cases instead , as this might be
a bit more serious (a whole parse may fail due to
this form of types).

Change-Id: I1403e1c1d81d4325b25ad12ff143a76f0b9ab3a7
ava/com/android/vcard/VCardEntryConstructor.java
ava/com/android/vcard/VCardUtils.java
ests/res/raw/v30_comma_separated.vcf
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/test_utils/VNodeBuilder.java
2bf85a1a15a3175119ab8415fc590fd5fe3d0752 18-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Make vCard importer/exporter aware of multi-byte parameters.

Based on the change Ic877940242d87ef918bf8d4dac601d37b296259b
Bug: 2922186

Change-Id: Id4cd674a0565670023b7bb1010b21d8349dd4daa
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardEntryConstructor.java
ava/com/android/vcard/VCardUtils.java
ests/res/raw/v30_multibyte_param.vcf
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/VCardUtilsTests.java
d5a8fc2a35c69fc34df35fd545ccf83d548ba50c 13-Jul-2010 Daisuke Miyakawa <dmiyakawa@google.com> Rename a test file for comma-separated values in VALUE fields.

Also add TODO for supporting the values.

Bug: 2835996
Change-Id: I02c9d8735cee943e307fbbe75f0635bad636c396
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardEntryConstructor.java
ava/com/android/vcard/VCardParserImpl_V21.java
ests/res/raw/v30_comma_separated.vcf
ests/res/raw/v30_pager.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
be622dcba259f1b514a91d9d3698ea4df65490a3 12-Jul-2010 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Make vCard builder suppress vCard 4.0 composition."
76a4a3b4d2c3bf1d8c8618a8b353b5fc3c3a27ab 12-Jul-2010 Daisuke Miyakawa <dmiyakawa@google.com> Make vCard builder suppress vCard 4.0 composition.

Bug: 2794181
Change-Id: I83fe72b079c284bb0ec690c88ccca96c9f69a902
ava/com/android/vcard/VCardBuilder.java
42f5f84d9d501893bc14702276f0300ca8230bb5 12-Jul-2010 Daisuke Miyakawa <dmiyakawa@google.com> Fix test breakage: Make test aware of anniversary in winmo case.

Previous implementation does not recognize anniversary but it does now.
Also fixes small bug around anniversary handling.

Bug: 2794181
Change-Id: I7f6185a35d77f6ed94fd38d0eea3f8c7de134dfe
ava/com/android/vcard/VCardEntry.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
c13101ba38c929d91dcb68e21165c82c19af35d7 06-Jul-2010 Daisuke Miyakawa <dmiyakawa@google.com> Anniversary support.

Bug: 2794181
Change-Id: I0e7997c81a1e993a4a02b38b67fb6d0d6753c007
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardEntry.java
be378d5b188f51cf717e5309e3c39180e85833a8 02-Jul-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add a first implementation for vCard 4.0.

TODO: need unit tests.

Bug: 2794181
Change-Id: I6be681f79479e9d6d436895e1b5539af54539f9c
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardComposer.java
ava/com/android/vcard/VCardConfig.java
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardEntry.java
ava/com/android/vcard/VCardParserImpl_V21.java
ava/com/android/vcard/VCardParserImpl_V30.java
ava/com/android/vcard/VCardParserImpl_V40.java
ava/com/android/vcard/VCardParser_V40.java
ava/com/android/vcard/VCardSourceDetector.java
ava/com/android/vcard/VCardUtils.java
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardJapanizationTests.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesVerifier.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/LineVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/PropertyNodesVerifier.java
ests/src/com/android/vcard/tests/test_utils/VCardVerifier.java
147f1ae5371954ae845cb2330b221df6ca1d8831 09-Jun-2010 Daisuke Miyakawa <dmiyakawa@google.com> Fix: make private to protected.

Change-Id: Icbc51b4ee0d728263953d90760d9c52364a47d3f
ava/com/android/vcard/VCardParserImpl_V21.java
f6d9e0eeae38a72481ce2e19d0872d3f8f81189f 09-Jun-2010 Daisuke Miyakawa <dmiyakawa@google.com> Make vCard 2.1 importer accept vCard with non-QP multiple lines.
Add unit test for it.

Bug: 2750981
Change-Id: Ie4c9437e505dccbbcc1f6812f627c62e804bc368
ava/com/android/vcard/VCardParserImpl_V21.java
ests/res/raw/v21_invalid_multiple_line.vcf
ests/src/com/android/vcard/tests/VCardImporterTests.java
58610106ce61adad9b1caa1fe9f7925c3e938bab 08-Jun-2010 Daisuke Miyakawa <dmiyakawa@google.com> Supress unnecessary warning.

Make VCardSourceDetector#PARSE_TYPE_UNKNOWN public for letting it
available for default estimated type.

Change-Id: I77a464ea22c2565f1d077b94db9f29233031297e
ava/com/android/vcard/VCardEntryConstructor.java
ava/com/android/vcard/VCardParserImpl_V21.java
ava/com/android/vcard/VCardSourceDetector.java
ava/com/android/vcard/VCardUtils.java
4199c54c527330ac01699b176e7bca186a3aa3a4 04-Jun-2010 Daisuke Miyakawa <dmiyakawa@google.com> Move vCard code in platform/framework/base to platform/framework/opt/vcard.

See also 33m4347ad6 in platform/framework/base.

Bug: 2735156
Change-Id: I64b1bd42515a32b354396a030ec77d1ea3c5a08c
ndroid.mk
ava/com/android/vcard/JapaneseUtils.java
ava/com/android/vcard/VCardBuilder.java
ava/com/android/vcard/VCardComposer.java
ava/com/android/vcard/VCardConfig.java
ava/com/android/vcard/VCardConstants.java
ava/com/android/vcard/VCardEntry.java
ava/com/android/vcard/VCardEntryCommitter.java
ava/com/android/vcard/VCardEntryConstructor.java
ava/com/android/vcard/VCardEntryCounter.java
ava/com/android/vcard/VCardEntryHandler.java
ava/com/android/vcard/VCardInterpreter.java
ava/com/android/vcard/VCardInterpreterCollection.java
ava/com/android/vcard/VCardParser.java
ava/com/android/vcard/VCardParserImpl_V21.java
ava/com/android/vcard/VCardParserImpl_V30.java
ava/com/android/vcard/VCardParser_V21.java
ava/com/android/vcard/VCardParser_V30.java
ava/com/android/vcard/VCardSourceDetector.java
ava/com/android/vcard/VCardUtils.java
ava/com/android/vcard/exception/VCardAgentNotSupportedException.java
ava/com/android/vcard/exception/VCardException.java
ava/com/android/vcard/exception/VCardInvalidCommentLineException.java
ava/com/android/vcard/exception/VCardInvalidLineException.java
ava/com/android/vcard/exception/VCardNestedException.java
ava/com/android/vcard/exception/VCardNotSupportedException.java
ava/com/android/vcard/exception/VCardVersionException.java
ests/Android.mk
ests/AndroidManifest.xml
ests/res/raw/v21_backslash.vcf
ests/res/raw/v21_complicated.vcf
ests/res/raw/v21_invalid_comment_line.vcf
ests/res/raw/v21_japanese_1.vcf
ests/res/raw/v21_japanese_2.vcf
ests/res/raw/v21_multiple_entry.vcf
ests/res/raw/v21_org_before_title.vcf
ests/res/raw/v21_pref_handling.vcf
ests/res/raw/v21_simple_1.vcf
ests/res/raw/v21_simple_2.vcf
ests/res/raw/v21_simple_3.vcf
ests/res/raw/v21_title_before_org.vcf
ests/res/raw/v21_winmo_65.vcf
ests/res/raw/v30_comma_separated.vcf
ests/res/raw/v30_simple.vcf
ests/src/com/android/vcard/tests/VCardExporterTests.java
ests/src/com/android/vcard/tests/VCardImporterTests.java
ests/src/com/android/vcard/tests/VCardJapanizationTests.java
ests/src/com/android/vcard/tests/VCardTestsBase.java
ests/src/com/android/vcard/tests/VCardUtilsTests.java
ests/src/com/android/vcard/tests/test_utils/ContactEntry.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesBuilder.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesVerifier.java
ests/src/com/android/vcard/tests/test_utils/ContentValuesVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/ExportTestProvider.java
ests/src/com/android/vcard/tests/test_utils/ExportTestResolver.java
ests/src/com/android/vcard/tests/test_utils/ImportTestProvider.java
ests/src/com/android/vcard/tests/test_utils/ImportTestResolver.java
ests/src/com/android/vcard/tests/test_utils/LineVerifier.java
ests/src/com/android/vcard/tests/test_utils/LineVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/PropertyNode.java
ests/src/com/android/vcard/tests/test_utils/PropertyNodesVerifier.java
ests/src/com/android/vcard/tests/test_utils/PropertyNodesVerifierElem.java
ests/src/com/android/vcard/tests/test_utils/VCardVerifier.java
ests/src/com/android/vcard/tests/test_utils/VNode.java
ests/src/com/android/vcard/tests/test_utils/VNodeBuilder.java
ef3f03c3683f7f52fa0fc3703f44b49eb20bcd91 03-Jun-2010 Nico Sallembien <nsallembien@google.com> new project, first commit