summaryrefslogtreecommitdiffstats
path: root/core/java/android/pim
diff options
context:
space:
mode:
authorDaisuke Miyakawa <dmiyakawa@google.com>2009-10-05 12:27:48 -0700
committerDaisuke Miyakawa <dmiyakawa@google.com>2009-10-05 13:55:35 -0700
commit71f97ac828566683f3346976426ee2effd301358 (patch)
treee0862d4909db1ebf5d86d94e9408aff9a71c82f6 /core/java/android/pim
parentadff654271246c700006e7f8079795d70319f032 (diff)
downloadframeworks_base-71f97ac828566683f3346976426ee2effd301358.zip
frameworks_base-71f97ac828566683f3346976426ee2effd301358.tar.gz
frameworks_base-71f97ac828566683f3346976426ee2effd301358.tar.bz2
Add cancel() VCardDataBuilder, which is intended to remove
a false alerm "Nested VCard code is not supported now." when importing vCard 3.0 file. Internal Issue number: 2158261
Diffstat (limited to 'core/java/android/pim')
-rw-r--r--core/java/android/pim/vcard/VCardDataBuilder.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/java/android/pim/vcard/VCardDataBuilder.java b/core/java/android/pim/vcard/VCardDataBuilder.java
index d2026d0..d00f616 100644
--- a/core/java/android/pim/vcard/VCardDataBuilder.java
+++ b/core/java/android/pim/vcard/VCardDataBuilder.java
@@ -86,7 +86,7 @@ public class VCardDataBuilder implements VCardBuilder {
boolean strictLineBreakParsing, int vcardType, Account account) {
this(null, charset, strictLineBreakParsing, vcardType, account);
}
-
+
/**
* @hide
*/
@@ -127,6 +127,18 @@ public class VCardDataBuilder implements VCardBuilder {
}
/**
+ * Called when the parse failed between startRecord() and endRecord().
+ * Currently it happens only when the vCard format is 3.0.
+ * (VCardVersionException is thrown by VCardParser_V21 and this object is reused by
+ * VCardParser_V30. At that time, startRecord() is called twice before endRecord() is called.)
+ * TODO: Should this be in VCardBuilder interface?
+ */
+ public void clear() {
+ mCurrentContactStruct = null;
+ mCurrentProperty = new ContactStruct.Property();
+ }
+
+ /**
* Assume that VCard is not nested. In other words, this code does not accept
*/
public void startRecord(String type) {