69831d9dc16c1d36739328910e5d7c0fb7d327fe |
|
02-Sep-2010 |
Daisuke Miyakawa <dmiyakawa@google.com> |
VCard refactoring backport. Change-Id: Icf265ce7f83c1e2bd5db0c3d9bd4c142afd6db34
/frameworks/base/core/java/android/pim/vcard/VCardParser_V30.java
|
d2145b97fb6d5eb4ef0f746869e9390e5a6853d6 |
|
17-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Clean up codes and remove/modify stale codes/comments. Internal issue number: 2195990
/frameworks/base/core/java/android/pim/vcard/VCardParser_V30.java
|
1b9e2bec6381ac7e7d0cfe0db549c5396d2ba7ce |
|
17-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Split vCard composer into two parts: VCardComposer and VCardBuilder. As for VCardBuilder, there was a class with the same name, but this implementation is fundamentally different. This time, VCardBuilder is like StringBuilder. It enables developers to create their own vCard by themselves. Make Constants public and rename it to VCardConstants. Internal issue number: 2242528, 2195990
/frameworks/base/core/java/android/pim/vcard/VCardParser_V30.java
|
0e983864fca215513de9664573dcc3bbadf41e79 |
|
09-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Support vCard format emitted by Windows Mobile 6.5, which contains invalid "VALUE" params and "AGENT" line. Internal Issue number: 2247192
/frameworks/base/core/java/android/pim/vcard/VCardParser_V30.java
|
ba2b21bee817c58e9b22c57e02ef6201e1cda1bd |
|
12-Oct-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Implement unit tests for vCard exporter, which depends on the sucess in vCard importer. In order to share the logic between tests for importer and those for exporter, PropertyNodesVerifier is now a separated class and drastically modified. Now the class accept "unordered" expected PropertyNode objects, which allows vCard composer to not care the exact order of each elements. MockCursor is added, which may be added into the public API in the future, but in the test directory for now. Another MockContentProvider is (temporarily) developed so that it can be accepted by MockContentResolver#addProvider(), which does not allow IContentProvider and its descendants but only exact ContentProvider, while the original MockContentProvider in android.test.mock.MockContentProvider implements IContentProvider. The test development is still on-going, but this test suffices minimal requirement of vCard tests. Internal issue number: 2160039
/frameworks/base/core/java/android/pim/vcard/VCardParser_V30.java
|
5c3e687965a49e4e54196a049337544a6eed61d9 |
|
06-Oct-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Develop ContentResolver-based unit tests for vCard importer and fix vCard code along with the tests Make test code not only check the validity of VCardParser but also check the validity of the data insertion part of ContactStruct class, using MockContentResolver/MockContentProvider. With these tests, we are now really sure vCard side appropriately sends vCard data into the resolver. Fix ContactStruct so that it properly handles ORG property and TITLE property, though it still does not see Group information. There's no vCard found which uses Group and ORG and TITLE in convolted orders... e.g. Current implementation misinterprets the following case, but we're not sure whether any exporter emits data in this kind of complicated form... group2.ORG:ComparyA group1.ORG:CompanyB group1.TITLE:TitleForA group2.TITLE:TitleForB Expected: CompanyA + TitleForA, CompanyB + TitleForB Actual: CompanyA + TitleForB, CompanyB + TitleForA Also change the parser part a little, so that some component can be reused via the other part of vCard code. Added several additional files for the tests, which ensures that - ORG/TITLE properties are handled as we expect. - PREF is appropriately handled and passed to the resolver as "IS_PRIMARY" flag. -- We discarded the code which ensures that "IS_PRIMARY" is added to only one field in each type, after the local discussion (the duplication or no primary state should be handled by the resolver). Internal Issue number: 2160039
/frameworks/base/core/java/android/pim/vcard/VCardParser_V30.java
|
718eaff0fadd999f488417fab1c05dca13ca0451 |
|
07-Sep-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Fix small bugs in VCardComposer.java. - The logic for emitting "FN" is wrong. - FileWriter's "double close" problem should occur in the current implementation. - Let VCardParser_V31.java ignore AGENT field instead of throwing an unkind VCardNotSupportedException.
/frameworks/base/core/java/android/pim/vcard/VCardParser_V30.java
|
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/VCardParser_V30.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/VCardParser_V30.java
|