summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-08-12 10:24:37 +0200
committerArne Schwabe <arne@rfc2549.org>2014-08-12 10:24:37 +0200
commitdeb731bba806d2bd3e85a1e7ea5c570530caf059 (patch)
tree18c8928d5f76b54d82ab6e8307de1373653873f7 /main
parentd96230feb493d36ec51fee635142a85f4490c46b (diff)
include commented out Acra support
--HG-- extra : rebase_source : f3396cea18633962ffa9f21d0537b9d4588a9bf4
Diffstat (limited to 'main')
-rw-r--r--main/build.gradle11
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java29
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java4
-rwxr-xr-xmain/src/main/res/values/strings.xml1
-rw-r--r--main/src/main/res/values/untranslatable.xml7
5 files changed, 43 insertions, 9 deletions
diff --git a/main/build.gradle b/main/build.gradle
index 527239e3..6d63c586 100644
--- a/main/build.gradle
+++ b/main/build.gradle
@@ -8,6 +8,7 @@ repositories {
dependencies {
compile 'com.intellij:annotations:12.0'
+// compile 'ch.acra:acra:4.5.0'
}
android {
@@ -31,6 +32,14 @@ android {
ovpn3 {
}
+
+ debug {
+
+ }
+
+ release {
+
+ }
}
/*
@@ -59,6 +68,8 @@ android {
//ovpn3
normal
+
+
/*
x86 {
diff --git a/main/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java b/main/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java
index 1daa3433..22eec3bd 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/ICSOpenVPNApplication.java
@@ -1,14 +1,35 @@
package de.blinkt.openvpn.core;
-
import android.app.Application;
-/**
- * Created by arne on 28.12.13.
- */
+import org.acra.ACRA;
+import org.acra.ReportingInteractionMode;
+import org.acra.annotation.ReportsCrashes;
+
+import de.blinkt.openvpn.BuildConfig;
+import de.blinkt.openvpn.R;
+import de.blinkt.openvpn.core.PRNGFixes;
+
+/*
+@ReportsCrashes(
+ formKey = "",
+ formUri = "http://reports.blinkt.de/report-icsopenvpn",
+ reportType = org.acra.sender.HttpSender.Type.JSON,
+ httpMethod = org.acra.sender.HttpSender.Method.PUT,
+ formUriBasicAuthLogin="report-icsopenvpn",
+ formUriBasicAuthPassword="Tohd4neiF9Ai!!!!111eleven",
+ mode = ReportingInteractionMode.TOAST,
+ resToastText = R.string.crash_toast_text
+)
+*/
public class ICSOpenVPNApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
PRNGFixes.apply();
+
+ if (BuildConfig.DEBUG) {
+ //ACRA.init(this);
+ }
}
+
}
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
index 1d3c1c58..3a37f5fb 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
@@ -43,7 +43,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement {
private boolean mWaitingForRelease = false;
private long mLastHoldRelease = 0;
- private static Vector<OpenVpnManagementThread> active = new Vector<OpenVpnManagementThread>();
+ private static final Vector<OpenVpnManagementThread> active = new Vector<OpenVpnManagementThread>();
private LocalSocket mServerSocketLocal;
private pauseReason lastPauseReason = pauseReason.noNetwork;
@@ -310,7 +310,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement {
if ((System.currentTimeMillis() - mLastHoldRelease) < 5000) {
try {
Thread.sleep(3000);
- } catch (InterruptedException e) {
+ } catch (InterruptedException ignored) {
}
}
diff --git a/main/src/main/res/values/strings.xml b/main/src/main/res/values/strings.xml
index ad46dd97..8b302ad7 100755
--- a/main/src/main/res/values/strings.xml
+++ b/main/src/main/res/values/strings.xml
@@ -323,4 +323,5 @@
<string name="mssfix_value_dialog">Announce to TCP sessions running over the tunnel that they should limit their send packet sizes such that after OpenVPN has encapsulated them, the resulting UDP packet size that OpenVPN sends to its peer will not exceed this number of bytes. (default is 1450)</string>
<string name="mssfix_checkbox">Override MSS value of TCP payload</string>
<string name="mssfix_dialogtitle">Set MSS of TCP payload</string>
+
</resources>
diff --git a/main/src/main/res/values/untranslatable.xml b/main/src/main/res/values/untranslatable.xml
index 4d2bc4d9..6845f984 100644
--- a/main/src/main/res/values/untranslatable.xml
+++ b/main/src/main/res/values/untranslatable.xml
@@ -34,11 +34,12 @@
<item>50</item>
<item>-1</item>
</string-array>
-
+ <string name="crash_toast_text">OpenVPN for Android crashed, crash reported</string>
+
<!-- These strings should not be visible to the user -->
<string name="state_user_vpn_permission" translatable="false">Waiting for user permission to use VPN API</string>
<string name="state_user_vpn_password" translatable="false">Waiting for user VPN password</string>
<string name="state_user_vpn_password_cancelled" translatable="false">VPN password input dialog cancelled</string>
<string name="state_user_vpn_permission_cancelled" translatable="false">VPN API permission dialog cancelled</string>
-
-</resources> \ No newline at end of file
+
+</resources>