From 3a668feec61695c3ffcbf2306d0dc153a97de98b Mon Sep 17 00:00:00 2001
From: Dmitri Plotnikov
Date: Wed, 22 Sep 2010 14:24:15 -0700
Subject: [PATCH] Adding PHOTO_URI and PHOTO_THUMBNAIL_URI.
Also adding a Directory feature declaration
of whether it supports photos or not. If not,
we don't have to display blank squares for
the corresponding contacts.
Change-Id: Ie98c11983f0a87dbe7315c2994f2375febeee2fc
---
api/current.xml | 77 ++++++++++++++++++
.../android/provider/ContactsContract.java | 79 ++++++++++++++++++-
2 files changed, 154 insertions(+), 2 deletions(-)
diff --git a/api/current.xml b/api/current.xml
index c43ebac2ff72a..db19baa37c463 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -150149,6 +150149,28 @@
visibility="public"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Type: INTEGER REFERENCES data(_id)
*/
public static final String PHOTO_ID = "photo_id";
+ /**
+ * A URI that can be used to retrieve the contact's full-size photo.
+ * A photo can be referred to either by a URI (this field) or by ID
+ * (see {@link #PHOTO_ID}). If PHOTO_ID is not null, PHOTO_URI and
+ * PHOTO_THUMBNAIL_URI shall not be null (but not necessarily vice versa).
+ * Thus using PHOTO_URI is a more robust method of retrieving contact photos.
+ *
+ * Type: TEXT
+ */
+ public static final String PHOTO_URI = "photo_uri";
+
+ /**
+ * A URI that can be used to retrieve a thumbnail of the contact's photo.
+ * A photo can be referred to either by a URI (this field or {@link #PHOTO_URI})
+ * or by ID (see {@link #PHOTO_ID}). If PHOTO_ID is not null, PHOTO_URI and
+ * PHOTO_THUMBNAIL_URI shall not be null (but not necessarily vice versa).
+ * If the content provider does not differentiate between full-size photos
+ * and thumbnail photos, PHOTO_THUMBNAIL_URI and {@link #PHOTO_URI} can contain
+ * the same value, but either both shell be null or both not null.
+ *
+ * Type: TEXT
+ */
+ public static final String PHOTO_THUMBNAIL_URI = "photo_thumb_uri";
+
/**
* Lookup value that reflects the {@link Groups#GROUP_VISIBLE} state of
* any {@link CommonDataKinds.GroupMembership} for this contact.
@@ -1032,6 +1093,20 @@ public final class ContactsContract {
* that mime type.
*
*
+ * | long |
+ * {@link #PHOTO_URI} |
+ * read-only |
+ * A URI that can be used to retrieve the contact's full-size photo. This
+ * column is the preferred method of retrieving the contact photo. |
+ *
+ *
+ * | long |
+ * {@link #PHOTO_THUMBNAIL_URI} |
+ * read-only |
+ * A URI that can be used to retrieve the thumbnail of contact's photo. This
+ * column is the preferred method of retrieving the contact photo. |
+ *
+ *
* | int |
* {@link #IN_VISIBLE_GROUP} |
* read-only |