Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f46a9cf3 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

API to combine LOOKUP_KEY and Contacts._ID together.

parent 16b72bbb
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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>