src/main/java/de/blau/android/photos/PhotoIndex.java
/**
     * Add image to index
     * 
     * @param db database containing the index
     * @param dir directory the image is in
     * @param f the image file
     * @return a Photo object
     */
Add image to index

@param db database containing the index
@param dir directory the image is in
@param f the image file
@return a Photo object
Add image to index @param db database containing the index @param dir directory the image is in @param f the image file @return a Photo object
@Nullable
    private Photo addPhoto(@NonNull SQLiteDatabase db, @NonNull File dir, @NonNull File f) {
        try {
            Photo p = new Photo(dir, f);
            insertPhoto(db, p, f.getName(), null);
            return p;
        } catch (NumberFormatException | IOException e) {
        }
        return null;
    }
@ Nullable private Photo addPhoto ( @ NonNull SQLiteDatabase db , @ NonNull File dir , @ NonNull File f ) { try { Photo p = new Photo ( dir , f ) ; insertPhoto ( db , p , f . getName ( ) , null ) ; return p ; } catch ( NumberFormatException | IOException e ) { } return null ; }
Add image to index
Add image to index
// ignore silently, broken pictures are not our business