diff options
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | api/system-current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/provider/ContactsContract.java | 43 |
3 files changed, 44 insertions, 1 deletions
diff --git a/api/current.txt b/api/current.txt index a356307c0400..2ab252c06aba 100644 --- a/api/current.txt +++ b/api/current.txt @@ -24443,6 +24443,7 @@ package android.provider { field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/email_v2"; field public static final android.net.Uri CONTENT_URI; field public static final java.lang.String DISPLAY_NAME = "data4"; + field public static final android.net.Uri ENTERPRISE_CONTENT_LOOKUP_URI; field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX"; field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS"; field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES"; diff --git a/api/system-current.txt b/api/system-current.txt index 7db9c54aff09..18234249a317 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -26042,6 +26042,7 @@ package android.provider { field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/email_v2"; field public static final android.net.Uri CONTENT_URI; field public static final java.lang.String DISPLAY_NAME = "data4"; + field public static final android.net.Uri ENTERPRISE_CONTENT_LOOKUP_URI; field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX"; field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS"; field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES"; diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index 67ac043425e9..08b21cb3ae8c 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -4982,14 +4982,16 @@ public final class ContactsContract { "phone_lookup"); /** - * URI used for the "enterprise caller-id". + * <p>URI used for the "enterprise caller-id".</p> * + * <p> * It supports the same semantics as {@link #CONTENT_FILTER_URI} and returns the same * columns. If the device has no corp profile that is linked to the current profile, it * behaves in the exact same way as {@link #CONTENT_FILTER_URI}. If there is a corp profile * linked to the current profile, it first queries against the personal contact database, * and if no matching contacts are found there, then queries against the * corp contacts database. + * </p> * <p> * If a result is from the corp profile, it makes the following changes to the data: * <ul> @@ -5958,6 +5960,45 @@ public final class ContactsContract { "lookup"); /** + * <p>URI used for enterprise email lookup.</p> + * + * <p> + * It supports the same semantics as {@link #CONTENT_LOOKUP_URI} and returns the same + * columns. If the device has no corp profile that is linked to the current profile, it + * behaves in the exact same way as {@link #CONTENT_LOOKUP_URI}. If there is a + * corp profile linked to the current profile, it first queries against the personal contact database, + * and if no matching contacts are found there, then queries against the + * corp contacts database. + * </p> + * <p> + * If a result is from the corp profile, it makes the following changes to the data: + * <ul> + * <li> + * {@link #PHOTO_THUMBNAIL_URI} and {@link #PHOTO_URI} will be rewritten to special + * URIs. Use {@link ContentResolver#openAssetFileDescriptor} or its siblings to + * load pictures from them. + * {@link #PHOTO_ID} and {@link #PHOTO_FILE_ID} will be set to null. Do not + * use them. + * </li> + * <li> + * Corp contacts will get artificial {@link #CONTACT_ID}s. In order to tell whether + * a contact + * is from the corp profile, use + * {@link ContactsContract.Contacts#isEnterpriseContactId(long)}. + * </li> + * </ul> + * <p> + * This URI does NOT support selection nor order-by. + * + * <pre> + * Uri lookupUri = Uri.withAppendedPath(Email.ENTERPRISE_CONTENT_LOOKUP_URI, + * Uri.encode(email)); + * </pre> + */ + public static final Uri ENTERPRISE_CONTENT_LOOKUP_URI = + Uri.withAppendedPath(CONTENT_URI, "lookup_enterprise"); + + /** * <p> * The content:// style URL for email lookup using a filter. The filter returns * records of MIME type {@link #CONTENT_ITEM_TYPE}. The filter is applied |