src/main/java/de/blau/android/photos/PhotoIndex.java
/**
     * Add image to index
     * 
     * @param f the image file
     * @return a Photo object or null
     */
Add image to index

@param f the image file
@return a Photo object or null
Add image to index @param f the image file @return a Photo object or null
@Nullable
    public synchronized Photo addPhoto(@NonNull File f) {
        SQLiteDatabase db = null;
        try {
            db = getWritableDatabase();
            Photo p = addPhoto(db, f.getParentFile(), f);
            addToIndex(p);
            return p;
        } finally {
            SavingHelper.close(db);
        }
    }
@ Nullable public synchronized Photo addPhoto ( @ NonNull File f ) { SQLiteDatabase db = null ; try { db = getWritableDatabase ( ) ; Photo p = addPhoto ( db , f . getParentFile ( ) , f ) ; addToIndex ( p ) ; return p ; } finally { SavingHelper . close ( db ) ; } }
Add image to index
Add image to index