Lines Matching defs:uri
51 public static String uriToString(Uri uri) {
52 return uri == null ? null : uri.toString();
55 public static boolean isEncodedContactUri(Uri uri) {
56 if (uri == null) {
59 final String lastPathSegment = uri.getLastPathSegment();
67 * @return {@code uri} as-is if the authority is of contacts provider. Otherwise
68 * or {@code uri} is null, return null otherwise
70 public static Uri nullForNonContactsUri(Uri uri) {
71 if (uri == null) {
74 return ContactsContract.AUTHORITY.equals(uri.getAuthority()) ? uri : null;
82 // the uri entirely just to retrieve the lookup key, but every uri is already parsed
83 // once anyway to check if it is an encoded JSON uri, so this has negligible effect
87 // This returns the third path segment of the uri, where the lookup key is located.