API to combine LOOKUP_KEY and Contacts._ID together.
This commit is contained in:
@@ -297,6 +297,15 @@ public final class ContactsContract {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build a {@link #CONTENT_LOOKUP_URI} lookup {@link Uri} using the
|
||||||
|
* given {@link Contacts#_ID} and {@link Contacts#LOOKUP_KEY}.
|
||||||
|
*/
|
||||||
|
public static Uri getLookupUri(long contactId, String lookupKey) {
|
||||||
|
return ContentUris.withAppendedId(Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI,
|
||||||
|
lookupKey), contactId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Computes a content URI (see {@link #CONTENT_URI}) given a lookup URI.
|
* Computes a content URI (see {@link #CONTENT_URI}) given a lookup URI.
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
Reference in New Issue
Block a user