am 14407ed0: am cca60741: am 60a3817c: Merge "API changes for ContactsContract" into lmp-dev
* commit '14407ed0cc8d23c4bbf6609611d522c0986894c1': API changes for ContactsContract
This commit is contained in:
@@ -24919,6 +24919,7 @@ package android.provider {
|
||||
|
||||
public static final class ContactsContract.PinnedPositions {
|
||||
ctor public ContactsContract.PinnedPositions();
|
||||
method public static void pin(android.content.ContentResolver, long, int);
|
||||
method public static void undemote(android.content.ContentResolver, long);
|
||||
field public static final int DEMOTED = -1; // 0xffffffff
|
||||
field public static final int UNPINNED = 0; // 0x0
|
||||
@@ -24998,7 +24999,6 @@ package android.provider {
|
||||
field public static final java.lang.String CONTACT_ID = "contact_id";
|
||||
field public static final java.lang.String DATA_SET = "data_set";
|
||||
field public static final java.lang.String DELETED = "deleted";
|
||||
field public static final java.lang.String NAME_VERIFIED = "name_verified";
|
||||
field public static final java.lang.String RAW_CONTACT_IS_READ_ONLY = "raw_contact_is_read_only";
|
||||
field public static final java.lang.String RAW_CONTACT_IS_USER_PROFILE = "raw_contact_is_user_profile";
|
||||
}
|
||||
|
||||
@@ -2272,6 +2272,8 @@ public final class ContactsContract {
|
||||
* The default value is "0"
|
||||
* </p>
|
||||
* <p>Type: INTEGER</p>
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final String NAME_VERIFIED = "name_verified";
|
||||
|
||||
@@ -8065,6 +8067,21 @@ public final class ContactsContract {
|
||||
String.valueOf(contactId), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pins a contact at a provided position, or unpins a contact.
|
||||
*
|
||||
* @param contentResolver to perform the pinning operation on.
|
||||
* @param pinnedPosition the position to pin the contact at. To unpin a contact, use
|
||||
* {@link PinnedPositions#UNPINNED}.
|
||||
*/
|
||||
public static void pin(
|
||||
ContentResolver contentResolver, long contactId, int pinnedPosition) {
|
||||
final Uri uri = Uri.withAppendedPath(Contacts.CONTENT_URI, String.valueOf(contactId));
|
||||
final ContentValues values = new ContentValues();
|
||||
values.put(Contacts.PINNED, pinnedPosition);
|
||||
contentResolver.update(uri, values, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Default value for the pinned position of an unpinned contact.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user