Merge pull request #7680 from eugene7646/remove_CR_popup_8422

Remove CR popup (8422)
This commit is contained in:
eugene7646 2022-09-30 11:24:46 -04:00 committed by GitHub
commit 6d55c16c50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 6 deletions

View File

@ -30,11 +30,11 @@ import org.sleuthkit.autopsy.coreutils.Version;
public class CentralRepositoryNotificationDialog {
/**
* This dialog should display iff the mode is RELEASE and the
* application is running with a GUI.
* This dialog should display if the mode is RELEASE and the application is
* running with a GUI.
*/
static boolean shouldDisplay() {
return Version.getBuildType() == Version.Type.RELEASE
return Version.getBuildType() == Version.Type.RELEASE
&& RuntimeProperties.runningWithGUI();
}

View File

@ -178,7 +178,12 @@ public class Installer extends ModuleInstall {
return; // Nothing to do
}
if (CentralRepositoryNotificationDialog.shouldDisplay()) {
// Some projects built on top of Autopsy platform set this environment
// variable to make sure there are no UI popups. This is necessary because
// Installer classes run before we have been able to determine
// whether we are running headless or not. See JIRA-8422.
if (System.getenv("AUTOPSY_HEADLESS") == null && CentralRepositoryNotificationDialog.shouldDisplay()) {
CentralRepositoryNotificationDialog.display();
}

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2013-2017 Basis Technology Corp.
* Copyright 2013-2022 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -49,7 +49,7 @@ public class RuntimeProperties {
/**
* Sets or unsets a flag indicating whether or not the application is running in a target system.
* The flag can only be set once per application innvocation
* The flag can only be set once per application invocation
*
* @param runningInTarget
*