f4ddea769098e24a7316b9ee895d323005433c2c |
|
23-Aug-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
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
/frameworks/base/core/java/android/pim/vcard/VCardDataBuilder.java
|
7674b81a05a8aa0b7a1be1bb04e041f6d2106fe2 |
|
09-Jul-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Refactor VCard-related code. Move VCard code from android/syncml/pim to android/pim since the code is not related to SyncML at all; Previous code was misplaced, I suppose. Reorganize "Builder" structure: Create VCardBuilderBase.java as a base class for "Builder" classes. Separate VCardDataBuilder to several components. Now, VCardBuilder is able to accept EntryHandlers (interface) which handle each VCard entry. Add EntriCommitter and ProgressShower as ones of EntryHandler implementations. Stop using VNode/PropertyNode in the actual importing path. Instead, VCard importer directly creates ContactStruct object. PropertyNode is still used in test codes, since it does not drop any kind of information while ContactStruct does. All codes are made hidden (with package.html) like the files in syncml directory; These files are only for Contacts app. Issue - due to internal issue 1975498, any performance test cannot be conducted. Next todos - Add tests for ContactStruct. - remove android/syncml directory. - Rename several methods; old names are based on V??? structure, which does not make sense in the current code. - Use ContentProviderOperation instead of relying on beginTransaction()/endTransaction(). - Use ContactsContact in Eclair Related internal issues - 1784580, 1728351
/frameworks/base/core/java/android/pim/vcard/VCardDataBuilder.java
|