public static boolean isLocalContactUri(Uri uri) {
    if (uri.getPath() == null) {
      return false;
    }
    return isLocalContentUri(uri)
        && ContactsContract.AUTHORITY.equals(uri.getAuthority())
        && !uri.getPath().startsWith(assumeNotNull(LOCAL_CONTACT_IMAGE_URI.getPath()));
  }
Checks if the given URI is a general Contact URI, and not a specific display photo.

@param uri the URI to check
@return true if the uri is a Contact URI, and is not already specifying a display photo.
fbcore/src/main/java/com/facebook/common/util/UriUtil.java