/** * Begin re-import process for the given {@code books}. * * <p>Checks if we have permission first, and if we don't then will trigger a visual indication to * the user that we need the permission. * * @param books Books to re-import. */ public static void reImportBooks(Iterable<RBook> books) { if (!Util.checkForStoragePermAndFireEventIfNeeded(R.id.action_execute_deferred)) { //noinspection unchecked Defer this action while we ask for permission. setDeferredAction(params -> reImportBooks((Iterable<RBook>) params[0]), books); return; } Importer.get().queueReImport(books); }