Bug864674 -[Gallery]- Hide pictures deleted from sdcard

You could just use photodb.getFile() here. Though that will call getDeviceStorage() each time, so it might be more efficient to do it this way.