Daisuke Miyakawa a2ba9a1999 Clean up vCard code.
With this change, the vCard composer does not emit any information
about CHARSET until it is really needed for parsing it (e.g. when
non-ascii chacacters are included in some value). This "may" be
effective toward external vCard importers which are not able to
understand non-ascii characters and CHARSET info itself.

Also now vCard composer does not use Quoted Printable until it is
really needed (e.g. until when the composer find non-"7bit"
characters are included in some value. "7bit" is defined in vCard 2.1,
which is "<7bit us-ascii printable chars, excluding CR LF>".

The vCard composer detects duplicate phone numbers, email addresses,
and remove them in default. The duplication would come from
aggregation done by the new ContactsProvider introduced in Eclair.
Even when two Accounts have two exactly same addresses, we cannot
ask ContactsProvider to exclude them since current implementation of
ContactsProvider2#queryEntities() does not acceps Contacts.CONTENT_URI
but only RawContacts.CONTENT_URI, which inevitably returns same
email addresses with different Accounts (ACCOUNT_NAME and ACCOUNT_TYPE
should be different. If not, the original contact itself should have
the duplication).

The vCard composer now detects null returned from queryEntities().
The null value is potentially harmful for vCard file, since it forces
the (old) vCard composer to emit meaningless line like "BDAY:".

Internal Issue number: 2150768, 2151954, 2154235
2009-09-29 13:59:01 -07:00
..
2009-09-29 13:59:01 -07:00
2009-09-28 18:22:46 -07:00
2009-09-17 09:44:43 -07:00
2009-09-17 11:21:47 -04:00
2009-09-29 13:44:47 -04:00