From 846eb30f78a9153102c743c2c1b49de1a4079fb1 Mon Sep 17 00:00:00 2001
From: David Brown
Date: Mon, 23 Aug 2010 17:40:51 -0700
Subject: Add SipAddress to ContactsContract.
This is a new data kind representing a SIP address for a contact.
The new class is ContactsContract.CommonDataKinds.SipAddress,
and the new mime type is "vnd.android.cursor.item/sip_address".
It's pretty generic right now (basically a single text field, like
"Website") but we may eventually want to extend it later to have multiple
labels+types (like phone numbers.)
Bug: 2942998
Change-Id: I45d90a680a3badf60bccb5aafdc2397037494e95
---
core/java/android/provider/ContactsContract.java | 47 ++++++++++++++++++++++++
1 file changed, 47 insertions(+)
(limited to 'core/java/android')
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index f0ee838..13cbda8 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -2305,6 +2305,7 @@ public final class ContactsContract {
* {@link CommonDataKinds.Website Website.CONTENT_ITEM_TYPE}
* {@link CommonDataKinds.Event Event.CONTENT_ITEM_TYPE}
* {@link CommonDataKinds.Relation Relation.CONTENT_ITEM_TYPE}
+ * {@link CommonDataKinds.SipAddress SipAddress.CONTENT_ITEM_TYPE}
*
*
*
@@ -4860,6 +4861,52 @@ public final class ContactsContract {
*/
public static final String URL = DATA;
}
+
+ /**
+ *
+ * A data kind representing a SIP address for the contact.
+ *
+ *
+ * You can use all columns defined for {@link ContactsContract.Data} as
+ * well as the following aliases.
+ *
+ * Column aliases
+ *
+ *
+ * Type |
+ * Alias | Data column |
+ *
+ *
+ * String |
+ * {@link #SIP_ADDRESS} |
+ * {@link #DATA1} |
+ * |
+ *
+ *
+ */
+ public static final class SipAddress implements DataColumnsWithJoins {
+ // TODO: Ultimately this class will probably implement
+ // CommonColumns too (in addition to DataColumnsWithJoins)
+ // since it may make sense to have multiple SIP addresses with
+ // different types+labels, just like with phone numbers.
+ //
+ // But that can be extended in the future without breaking any
+ // public API, so let's keep this class ultra-simple for now.
+
+ /**
+ * This utility class cannot be instantiated
+ */
+ private SipAddress() {}
+
+ /** MIME type used when storing this in data table. */
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/sip_address";
+
+ /**
+ * The SIP address.
+ * Type: TEXT
+ */
+ public static final String SIP_ADDRESS = DATA1;
+ }
}
/**
--
cgit v1.1