API to combine LOOKUP_KEY and Contacts._ID together.

This commit is contained in:
Jeff Sharkey
2009-09-09 13:17:44 -07:00
parent 16b72bbbc9
commit f46a9cf382

View File

@@ -297,6 +297,15 @@ public final class ContactsContract {
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.
* <p>