Refactor VCard handling code, phase 2, 3, 4, 5
Phase 2
Make VCard Importer use Data structures in ContactsContract instead of
using old Conatacts structure.
Phase 3
Developed VCardComposer, which was originally in Contacts package, but
now in base/core/java. Also made it use queryEntries() as per jsharkey's
suggestion.
Phase 4
Added VCardUtils and moved some common methods to it, some of which should be
in public API, but hidden for now.
Phase 5
Made VCardComposer emits (almost) valid vCard 3.0 data.
Confirmed with vCard data emitted by Mac.
Related issue:
1784580, 1728351, 1967349
Note:
Probable next step:
- Add "fast parse" mode in VCradBuilder, in which, VCardBuilder skip parsing the value of
each property. It will make the parsing faster.
-- Note that parsing the parameters of each entry cannot be skipped, since it may contains
the information about Encoding of the property. In other words, if the line is
in Quoted-Printable format, the next line may be the part of the property, not a
separated property, which should be parsed accordingly.
- Needs test
14 files changed