From deb731bba806d2bd3e85a1e7ea5c570530caf059 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 12 Aug 2014 10:24:37 +0200 Subject: include commented out Acra support --HG-- extra : rebase_source : f3396cea18633962ffa9f21d0537b9d4588a9bf4 --- main/build.gradle | 11 ++++++++ .../blinkt/openvpn/core/ICSOpenVPNApplication.java | 29 +++++++++++++++++++--- .../openvpn/core/OpenVpnManagementThread.java | 4 +-- main/src/main/res/values/strings.xml | 1 + main/src/main/res/values/untranslatable.xml | 7 +++--- 5 files changed, 43 insertions(+), 9 deletions(-) (limited to 'main') 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 active = new Vector(); + private static final Vector active = new Vector(); 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 @@ 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) Override MSS value of TCP payload Set MSS of TCP payload + 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 @@ 50 -1 - + OpenVPN for Android crashed, crash reported + Waiting for user permission to use VPN API Waiting for user VPN password VPN password input dialog cancelled VPN API permission dialog cancelled - - \ No newline at end of file + + -- cgit v1.2.3