summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-03-27 16:43:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-03-27 16:43:41 +0000
commit038fbc5d099c6fb8903ccc00c0988d482bfb8046 (patch)
treef3987181e5c2ad11b8daf52f52669520e000b727
parent993f10af84768bc37dac211efe3133257680f2d1 (diff)
parent4f401ebf14f31f411581588c3e649a00c94a06e7 (diff)
downloadframeworks_base-038fbc5d099c6fb8903ccc00c0988d482bfb8046.zip
frameworks_base-038fbc5d099c6fb8903ccc00c0988d482bfb8046.tar.gz
frameworks_base-038fbc5d099c6fb8903ccc00c0988d482bfb8046.tar.bz2
Merge "Add new apis to CP2" into jb-mr2-dev
-rw-r--r--api/current.txt8
-rw-r--r--core/java/android/provider/ContactsContract.java39
2 files changed, 47 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt
index cfaa1bb..d0149aa 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -17935,6 +17935,13 @@ package android.provider {
field public static final java.lang.String TYPE = "data2";
}
+ public static final class ContactsContract.CommonDataKinds.Contactables implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
+ ctor public ContactsContract.CommonDataKinds.Contactables();
+ field public static final android.net.Uri CONTENT_FILTER_URI;
+ field public static final android.net.Uri CONTENT_URI;
+ field public static final java.lang.String VISIBLE_CONTACTS_ONLY = "visible_contacts_only";
+ }
+
public static final class ContactsContract.CommonDataKinds.Email implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
method public static final int getTypeLabelResource(int);
@@ -18228,6 +18235,7 @@ package android.provider {
method public static android.net.Uri getContactLookupUri(android.content.ContentResolver, android.net.Uri);
field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/data";
field public static final android.net.Uri CONTENT_URI;
+ field public static final java.lang.String VISIBLE_CONTACTS_ONLY = "visible_contacts_only";
}
protected static abstract interface ContactsContract.DataColumns {
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index 8f54a38..a4c4411 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -4325,6 +4325,13 @@ public final class ContactsContract {
public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "data");
/**
+ * A boolean parameter for {@link Data#CONTENT_URI}.
+ * This specifies whether or not the returned data items should be filtered to show
+ * data items belonging to visible contacts only.
+ */
+ public static final String VISIBLE_CONTACTS_ONLY = "visible_contacts_only";
+
+ /**
* The MIME type of the results from {@link #CONTENT_URI}.
*/
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/data";
@@ -6833,6 +6840,38 @@ public final class ContactsContract {
public static final Uri CONTENT_FILTER_URI = Uri.withAppendedPath(CONTENT_URI,
"filter");
}
+
+ /**
+ * A special class of data items, used to refer to types of data that can be used to attempt
+ * to start communicating with a person ({@link Phone} and {@link Email}). Note that this
+ * is NOT a separate data kind.
+ *
+ * This URI allows the ContactsProvider to return a unified result for data items that users
+ * can use to initiate communications with another contact. {@link Phone} and {@link Email}
+ * are the current data types in this category.
+ */
+ public static final class Contactables implements DataColumnsWithJoins, CommonColumns {
+ /**
+ * The content:// style URI for these data items, which requests a directory of data
+ * rows matching the selection criteria.
+ */
+ public static final Uri CONTENT_URI = Uri.withAppendedPath(Data.CONTENT_URI,
+ "contactables");
+
+ /**
+ * The content:// style URI for these data items, which allows for a query parameter to
+ * be appended onto the end to filter for data items matching the query.
+ */
+ public static final Uri CONTENT_FILTER_URI = Uri.withAppendedPath(
+ Contactables.CONTENT_URI, "filter");
+
+ /**
+ * A boolean parameter for {@link Data#CONTENT_URI}.
+ * This specifies whether or not the returned data items should be filtered to show
+ * data items belonging to visible contacts only.
+ */
+ public static final String VISIBLE_CONTACTS_ONLY = "visible_contacts_only";
+ }
}
/**