src/main/java/de/blau/android/photos/PhotoIndex.java
/**
     * Add image to index
     * 
     * @param context an Android Context
     * @param uri the Uri for the photo
     * @param displayName a name for the photo for display purposes
     * @return a Photo object
     */
Add image to index

@param context an Android Context
@param uri the Uri for the photo
@param displayName a name for the photo for display purposes
@return a Photo object
Add image to index @param context an Android Context @param uri the Uri for the photo @param displayName a name for the photo for display purposes @return a Photo object
@Nullable
    public synchronized Photo addPhoto(@NonNull Context context, @NonNull Uri uri, @Nullable String displayName) {
        SQLiteDatabase db = null;
        try {
            db = getWritableDatabase();
            return addPhoto(context, db, uri, displayName != null ? displayName : uri.getLastPathSegment());
        } finally {
            SavingHelper.close(db);
        }
    }
@ Nullable public synchronized Photo addPhoto ( @ NonNull Context context , @ NonNull Uri uri , @ Nullable String displayName ) { SQLiteDatabase db = null ; try { db = getWritableDatabase ( ) ; return addPhoto ( context , db , uri , displayName != null ? displayName : uri . getLastPathSegment ( ) ) ; } finally { SavingHelper . close ( db ) ; } }
Add image to index
Add image to index