69831d9dc16c1d36739328910e5d7c0fb7d327fe |
|
02-Sep-2010 |
Daisuke Miyakawa <dmiyakawa@google.com> |
VCard refactoring backport. Change-Id: Icf265ce7f83c1e2bd5db0c3d9bd4c142afd6db34
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
b7688558cc30bceac8377640db68126e53dd545e |
|
18-Aug-2010 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Make vCard importer/exporter aware of multi-byte parameters. Bug: 2922186 Change-Id: Ic877940242d87ef918bf8d4dac601d37b296259b
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
973afa96bf184be6b8b5a25963568650e70750f7 |
|
03-Dec-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Add isPrintableAscii() and isPrintableAsciiOnly() to TextUtils.java as hidden methods, and make vCard code use them. In the future, ContactsProvider will use those methods. See also the change 34604 Internal issue number: 2275764, 2195990
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
a750fdd765ec253ffa8bf3d4848d5c3a35e1979b |
|
20-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Fix a problem in which Android custom fields are not emitted correctly in non-Ascii languages. Internal issue number: 2195990
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
a6d81e3ee4cf12ade1ef6701b5f1fcdd390fc98a |
|
19-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Make vCard code refrain from using NEIGHBORHOOD field when importing. Internal issue number: 2195990
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
c4b51712d89e9fb742b598911e611c80ad51de82 |
|
19-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Modify vCard exporter code so that it does not emit non-Ascii type. Also add unit tests. Internal issue number: 2195990
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
49c0decf46d4f7082a17e595fba2c501a8369452 |
|
18-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Code clean up. Internal issue number: 2195990
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
839c036444c8a5335cc557e174acc7ee28baafc4 |
|
18-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Add unit tests. Internal issue number: 2195990
/frameworks/base/core/java/android/pim/vcard/VCardUtils.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/VCardUtils.java
|
3d745c2b925ccc7c6591dbb3dfd21649782af991 |
|
16-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Make vCard composer use Base64 class for encoding String into bytes instead of using its own implementation. Internal issue number: 2195990
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
5a1f2d2de026b582fbe8b1a46a83ad33760a2c48 |
|
16-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Rename several files so that readers would not be confused. Add unit tests around Phone-number handling and fix some bugs. Internal issue number: 2195990
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
592988d307e8d305ca163c4e58da0fb350054194 |
|
12-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Add unit tests for Japanization and fix several bugs. Internal issue number: 2195990
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
f2ad61c83da509270b8c5e9583b503ced928315d |
|
10-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Make vCard exporter check invalid phone numbers and re-format them if needed. Also add a unit test for the case. Internal issue number: 2246410
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
4fe2c57c3c123dfd0c335b2390a661bcb7b546fb |
|
05-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Add tests for Japanization part of vCard. Fix several bugs around name construction. Internal issue number: 2195990
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
26ee0ae9de37e50b790a0a7b7bddb1d27d5b1214 |
|
05-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Make vCard importer handle "PAGER" phone number correctly. Add tests for it. Internal issue number: 2239492
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
6cb76ac37f1b4a36d81db7d7e8652d82b6f1b8b5 |
|
03-Nov-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Rename the term "attribute"/"attr" to "parameter"/param". We had been using "parameter"/"param" by mistake, while both vCard formats uses theterm "attribute"/"attr". This is confusing. Internal issue number: 2233884
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
99a0a2cd73503513891565a4aaf99e209bd262d2 |
|
14-Oct-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Add tests and fix vCard code. Now, basic tests are almost ready. TODO: - importer test toward multiple vCard input (though it was tested with real usage) - exporter tests for multiple composition - tests with non-Ascii - tests with special types like TYPE_DOCOMO ISSUE: In order to fully check the validity of exporter, we may have to develop some vCard importer which rejects vCard which is valid but a kind of dubious. Internal Issue Number: 2160039
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
021de736237f6d408d61c1c4f884f98125cc081a |
|
09-Oct-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
Clean-up vCard code. Note that refactor is still on-going. Some changes done now may be reverted in the future. - Move reusable constants from VCardComposer to Constants. - Make ContactStruct appropriately refers to Constants. - Move PBAP-related code at the bottom of vCard composer - Remove some redundant code. Internal issue number: 2160039
/frameworks/base/core/java/android/pim/vcard/VCardUtils.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/VCardUtils.java
|
a2ba9a199962eb1b14ac3e0aa0fbc4c557298c96 |
|
29-Sep-2009 |
Daisuke Miyakawa <dmiyakawa@google.com> |
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
/frameworks/base/core/java/android/pim/vcard/VCardUtils.java
|
6ba23c59f24b443cd21c6289fa0aac3df8f17017 |
|
10-Sep-2009 |
Jeff Sharkey <jsharkey@android.com> |
Handle cases where TYPE can be undefined, such as EAS. When TYPE not provided, assume a default value and check that label isn't empty when CUSTOM is used.
/frameworks/base/core/java/android/pim/vcard/VCardUtils.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/VCardUtils.java
|