diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 11ac5611b3..53cf8733b9 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -61,6 +61,7 @@ import org.sleuthkit.autopsy.coreutils.Version; import org.sleuthkit.autopsy.events.AutopsyEvent; import org.sleuthkit.autopsy.events.AutopsyEventException; import org.sleuthkit.autopsy.events.AutopsyEventPublisher; +import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.datamodel.*; import org.sleuthkit.datamodel.SleuthkitJNI.CaseDbHandle.AddImageProcess; @@ -524,9 +525,11 @@ public class Case { * * @param newDataSource new data source added */ - void notifyNewDataSource(Content newDataSource) { + public void notifyNewDataSource(Content newDataSource) { eventPublisher.publish(new DataSourceAddedEvent(newDataSource)); - CoreComponentControl.openCoreWindows(); + if (IngestManager.getInstance().isRunningInteractively()) { + CoreComponentControl.openCoreWindows(); + } } /** @@ -1329,7 +1332,6 @@ public class Case { } } - /** * Adds a report to the case. * diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java index a3dc8dade9..2dc5b92c6e 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -337,6 +337,15 @@ public class IngestManager { this.runInteractively = runInteractively; } + /** + * The ingest manager can be directed to forgo use of message boxes, the + * ingest message box, NetBeans progress handles, etc. Running interactively + * is the default. + */ + public synchronized boolean isRunningInteractively() { + return this.runInteractively; + } + /** * Called by the custom installer for this package once the window system is * initialized, allowing the ingest manager to get the top component used to