/** * @param context The context * @return The photo Uri. If it isn't set a default contact picture is returned. * @see #setPhotoUri(android.net.Uri) * @see #setPhotoUri(String) * @see #getPhotoUri() */ public Uri getPhotoUriOrDefault(Context context) { Uri result = mDetails.getPhotoUri(); if (result == null) { result = Uri.withAppendedPath( Uri.parse("android.resource://" + context.getPackageName()), String.valueOf(R.drawable.ic_contact_picture)); } return result; }
/** * @return The photo Uri. If it isn't set null is returned * @see #setPhotoUri(android.net.Uri) * @see #setPhotoUri(String) * @see #getPhotoUri(Context context) */ public Uri getPhotoUri() { return mDetails.getPhotoUri(); }