History log of /frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java
87315f4cddec4c9bb09a48497c8b6bd65a8b99c7 05-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Make local variable for photo private.

Need I2ef49fde19549da6515b6a7c9a6953fa8834cbaf

Bug: 4066223
Change-Id: I75e87b66268b817b78d9a6f093872ddac9466ff2
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java
517540b6e3903371def5eb4ca44c2bb2ff91ae30 05-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Add hashCode().

Bug: 4066223
Change-Id: I917761014753605ee06f53cbc6499ca9fe9a7956
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java
02117b3d19787ff65486b9f9db8abd338ae4c9f9 11-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Use same TAG in vCard

Tiny cleanups are included

Bug: 4066223
Change-Id: I0b121e93ea5c624325d44b8aa6bab42d9a9a24fb
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java
f98084b727f30713a31ace82e63341a4fa2ae5d7 16-Feb-2011 Daisuke Miyakawa <dmiyakawa@google.com> Reduce the number of applyBatch() call

Bug: 3435697
Change-Id: I89b13097638407cc700f2faafd201cc142e4f9e0
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java
37634a0179f74431317f50d2ce493e3fad36f5a9 21-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Modify vCard importer/exporter around sip handling

Bug: 2985401
Change-Id: I8216dd80bcb09669be807dd92452e69fe2a11a65
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java
a7cff0a3bfc08867f3aa7998524f93ea5824549e 15-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add RAW_CONTACT_ID for refraining NPE.

BUg: 3004082
Change-Id: I4eda4b6ca019141091c422e81c02a2abc314b0b3
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java
88d0f1ef715f2e1209eba5d175b1b71c556fa8b0 05-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add SIP support for vCard 3.0.

Change-Id: I48b7057dc802c37936e31fbe95798af6b2c06a5b
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java
06ae82316d0b5f7222a7a1d15b7d03df88fdea15 24-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Fix vCard importer so that it imports IM correctly.

Bug: 2944990
Change-Id: I9aba68f03569b9288c4286b73bf3e4e4b84e6d1a
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java
c13101ba38c929d91dcb68e21165c82c19af35d7 06-Jul-2010 Daisuke Miyakawa <dmiyakawa@google.com> Anniversary support.

Bug: 2794181
Change-Id: I0e7997c81a1e993a4a02b38b67fb6d0d6753c007
/frameworks/opt/vcard/java/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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.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
/frameworks/opt/vcard/java/com/android/vcard/VCardEntry.java