summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2016-02-06 13:00:53 +0100
committerParménides GV <parmegv@sdf.org>2016-02-06 13:35:04 +0100
commit5b95785060adace6b48a69d560051261233d954d (patch)
tree16a9604c7b395cea169497c4eb12e47511d2d629 /app/src/main/java/de/blinkt/openvpn/LaunchVPN.java
parent096faf08f2d0cc4dc4a28677415391942410063d (diff)
Update ics-openvpn
Diffstat (limited to 'app/src/main/java/de/blinkt/openvpn/LaunchVPN.java')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/LaunchVPN.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java b/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java
index 90216a70..721e8991 100644
--- a/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java
+++ b/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 Arne Schwabe
+ * Copyright (c) 2012-2016 Arne Schwabe
* Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt
*/
@@ -20,6 +20,7 @@ import android.preference.PreferenceManager;
import android.text.InputType;
import android.text.TextUtils;
import android.text.method.PasswordTransformationMethod;
+import android.util.Log;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
@@ -63,6 +64,8 @@ public class LaunchVPN extends Activity {
public static final String EXTRA_KEY = "de.blinkt.openvpn.shortcutProfileUUID";
public static final String EXTRA_NAME = "de.blinkt.openvpn.shortcutProfileName";
public static final String EXTRA_HIDELOG = "de.blinkt.openvpn.showNoLogWindow";
+ public static final String CLEARLOG = "clearlogconnect";
+
private static final int START_VPN_PROFILE= 70;
@@ -93,6 +96,10 @@ public class LaunchVPN extends Activity {
if(Intent.ACTION_MAIN.equals(action)) {
+ // Check if we need to clear the log
+ if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(CLEARLOG, true))
+ VpnStatus.clearLog();
+
// we got called to be the starting point, most likely a shortcut
String shortcutUUID = intent.getStringExtra( EXTRA_KEY);
String shortcutName = intent.getStringExtra( EXTRA_NAME);
@@ -115,7 +122,7 @@ public class LaunchVPN extends Activity {
}
}
-
+
@Override
protected void onActivityResult (int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);