diff options
author | Dmitri Plotnikov <dplotnikov@google.com> | 2009-08-06 20:19:29 -0700 |
---|---|---|
committer | Dmitri Plotnikov <dplotnikov@google.com> | 2009-08-06 20:19:29 -0700 |
commit | d4e0b5713add447bbba7d716c112f425d6888f3b (patch) | |
tree | 49b31e3bcf97e9f9b5a6aaa196f640dc93bee381 | |
parent | 6874e3df0e3f6d6db6b474e73426f286db9ec6a8 (diff) | |
download | frameworks_base-d4e0b5713add447bbba7d716c112f425d6888f3b.zip frameworks_base-d4e0b5713add447bbba7d716c112f425d6888f3b.tar.gz frameworks_base-d4e0b5713add447bbba7d716c112f425d6888f3b.tar.bz2 |
Clean-up of API for filtering contacts by phone or email. The api is now symmetrical.
Also, giving Presence.RAW_CONTACT_ID and Presence.DATA_ID unique ids to allow easy joining. The main rationale for this is that SQLite does not allow cross-database joins in VIEWs, so we cannot hide this join inside a VIEW.
-rw-r--r-- | core/java/android/provider/ContactsContract.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index b5fa577..9b0c70e 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -432,6 +432,7 @@ public final class ContactsContract { * * @hide */ + @Deprecated public static final Uri CONTENT_FILTER_EMAIL_URI = Uri.withAppendedPath(CONTENT_URI, "filter_email"); @@ -642,13 +643,13 @@ public final class ContactsContract { * Reference to the {@link RawContacts#_ID} this presence references. * <P>Type: INTEGER</P> */ - public static final String RAW_CONTACT_ID = "raw_contact_id"; + public static final String RAW_CONTACT_ID = "presence_raw_contact_id"; /** * Reference to the {@link Data#_ID} entry that owns this presence. * <P>Type: INTEGER</P> */ - public static final String DATA_ID = "data_id"; + public static final String DATA_ID = "presence_data_id"; /** * The IM service the presence is coming from. Formatted using either @@ -950,6 +951,22 @@ public final class ContactsContract { /** MIME type used when storing this in data table. */ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/email"; + /** + * The content:// style URI for all data records of the + * {@link Email#CONTENT_ITEM_TYPE} MIME type, combined with the + * associated raw contact and aggregate contact data. + */ + public static final Uri CONTENT_URI = Uri.withAppendedPath(Data.CONTENT_URI, + "emails"); + + /** + * The content:// style URL for filtering data rows by email address. The + * filter argument should be passed as an additional path segment after + * this URI. + */ + public static final Uri CONTENT_FILTER_EMAIL_URI = Uri.withAppendedPath(CONTENT_URI, + "filter"); + public static final int TYPE_HOME = 1; public static final int TYPE_WORK = 2; public static final int TYPE_OTHER = 3; @@ -1230,7 +1247,7 @@ public final class ContactsContract { public static final int TYPE_ANNIVERSARY = 1; public static final int TYPE_OTHER = 2; - + /** * The event start date as the user entered it. * <P>Type: TEXT</P> |