103 lines
4.4 KiB
Diff
103 lines
4.4 KiB
Diff
|
diff --git a/src/net/azib/ipscan/Main.java b/src/net/azib/ipscan/Main.java
|
||
|
index 3e06a31e..8d1a82ba 100644
|
||
|
--- a/src/net/azib/ipscan/Main.java
|
||
|
+++ b/src/net/azib/ipscan/Main.java
|
||
|
@@ -10,7 +10,6 @@ import net.azib.ipscan.di.Injector;
|
||
|
import net.azib.ipscan.gui.GUI;
|
||
|
import net.azib.ipscan.gui.InfoDialog;
|
||
|
import net.azib.ipscan.gui.MacApplicationMenu;
|
||
|
-import net.azib.ipscan.util.GoogleAnalytics;
|
||
|
|
||
|
import java.io.File;
|
||
|
import java.nio.file.Files;
|
||
|
@@ -67,7 +66,6 @@ public class Main {
|
||
|
}
|
||
|
catch (UnsatisfiedLinkError e) {
|
||
|
e.printStackTrace();
|
||
|
- new GoogleAnalytics().report(e);
|
||
|
showFallbackError("Failed to load native code for Java " +
|
||
|
System.getProperty("java.runtime.version") + " on " + System.getProperty("os.arch") +
|
||
|
"\nProbably you are using a binary built for wrong OS or CPU.\n\n" + e.getMessage());
|
||
|
@@ -80,7 +78,6 @@ public class Main {
|
||
|
}
|
||
|
catch (NoClassDefFoundError e) {
|
||
|
e.printStackTrace();
|
||
|
- new GoogleAnalytics().report(e);
|
||
|
showFallbackError("SWT GUI toolkit not available: " + e + "\n\nIf you are using platform-neutral build, make sure you provide SWT built for your platform manually (e.g. install libswt packages), or please use a platform specific binary.");
|
||
|
}
|
||
|
catch (Throwable e) {
|
||
|
@@ -90,7 +87,6 @@ public class Main {
|
||
|
|
||
|
private static void handleFatalError(GUI gui, Throwable e) {
|
||
|
e.printStackTrace();
|
||
|
- new GoogleAnalytics().report(e);
|
||
|
if (gui != null)
|
||
|
gui.showMessage(0, "Fatal Error", e + "\nPlease submit a bug report mentioning your OS and what exactly were you doing.");
|
||
|
else
|
||
|
diff --git a/src/net/azib/ipscan/gui/GUI.java b/src/net/azib/ipscan/gui/GUI.java
|
||
|
index c2f46fda..4ad7ed02 100644
|
||
|
--- a/src/net/azib/ipscan/gui/GUI.java
|
||
|
+++ b/src/net/azib/ipscan/gui/GUI.java
|
||
|
@@ -4,7 +4,6 @@ import net.azib.ipscan.config.LoggerFactory;
|
||
|
import net.azib.ipscan.config.Version;
|
||
|
import net.azib.ipscan.core.UserErrorException;
|
||
|
import net.azib.ipscan.di.Injector;
|
||
|
-import net.azib.ipscan.util.GoogleAnalytics;
|
||
|
import org.eclipse.swt.SWT;
|
||
|
import org.eclipse.swt.SWTError;
|
||
|
import org.eclipse.swt.SWTException;
|
||
|
@@ -33,11 +32,9 @@ public class GUI implements AutoCloseable {
|
||
|
catch (SWTError e) {
|
||
|
if (e.getMessage().contains("gtk_init_check")) {
|
||
|
System.err.println(e.toString() + ": probably you are running as `root` and/or don't have access to the X Server. Please run as normal user or with sudo.");
|
||
|
- new GoogleAnalytics().report(e);
|
||
|
}
|
||
|
else if (e.getMessage().contains("Invalid thread access")) {
|
||
|
System.err.println(e.toString() + ": you need to start Java with -XstartOnFirstThread on a Mac");
|
||
|
- new GoogleAnalytics().report(e);
|
||
|
}
|
||
|
else throw e;
|
||
|
}
|
||
|
@@ -62,9 +59,6 @@ public class GUI implements AutoCloseable {
|
||
|
String localizedMessage = getLocalizedMessage(e);
|
||
|
showMessage(e instanceof UserErrorException ? SWT.ICON_WARNING : SWT.ICON_ERROR,
|
||
|
getLabel(e instanceof UserErrorException ? "text.userError" : "text.error"), localizedMessage);
|
||
|
-
|
||
|
- if (!(e instanceof UserErrorException) || e.getCause() != null)
|
||
|
- new GoogleAnalytics().report(e);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
diff --git a/src/net/azib/ipscan/gui/Startup.java b/src/net/azib/ipscan/gui/Startup.java
|
||
|
index ad705d3d..5689a892 100644
|
||
|
--- a/src/net/azib/ipscan/gui/Startup.java
|
||
|
+++ b/src/net/azib/ipscan/gui/Startup.java
|
||
|
@@ -5,7 +5,6 @@ import net.azib.ipscan.config.Labels;
|
||
|
import net.azib.ipscan.config.Platform;
|
||
|
import net.azib.ipscan.config.Version;
|
||
|
import net.azib.ipscan.gui.actions.HelpMenuActions.CheckVersion;
|
||
|
-import net.azib.ipscan.util.GoogleAnalytics;
|
||
|
import org.eclipse.swt.widgets.Display;
|
||
|
import org.eclipse.swt.widgets.Shell;
|
||
|
|
||
|
@@ -22,7 +21,6 @@ public class Startup {
|
||
|
|
||
|
public void onStart() {
|
||
|
if (guiConfig.isFirstRun) {
|
||
|
- new GoogleAnalytics().asyncReport("First run");
|
||
|
Display.getCurrent().asyncExec(() -> {
|
||
|
GettingStartedDialog dialog = new GettingStartedDialog();
|
||
|
if (Platform.CRIPPLED_WINDOWS)
|
||
|
@@ -35,11 +33,9 @@ public class Startup {
|
||
|
});
|
||
|
}
|
||
|
else if (!Version.getVersion().equals(guiConfig.lastRunVersion)) {
|
||
|
- new GoogleAnalytics().asyncReport("Update " + guiConfig.lastRunVersion + " to " + Version.getVersion());
|
||
|
guiConfig.lastRunVersion = Version.getVersion();
|
||
|
}
|
||
|
else if (guiConfig.versionCheckEnabled && System.currentTimeMillis() - guiConfig.lastVersionCheck > 30L * 24 * 3600 * 1000) {
|
||
|
- new GoogleAnalytics().asyncReport("Version check " + Version.getVersion());
|
||
|
checkForLatestVersion();
|
||
|
}
|
||
|
}
|