From b3e20603bb687da8a348f1c73d9645f86d159483 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 29 Feb 2016 09:55:09 +0100 Subject: Fix crash on Android 6.0 --- main/src/main/AndroidManifest.xml | 3 +++ main/src/main/java/de/blinkt/openvpn/LaunchVPN.java | 7 +++---- main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'main') diff --git a/main/src/main/AndroidManifest.xml b/main/src/main/AndroidManifest.xml index f9c75da0..a6ec8b0a 100644 --- a/main/src/main/AndroidManifest.xml +++ b/main/src/main/AndroidManifest.xml @@ -27,6 +27,7 @@ @@ -141,6 +143,7 @@ android:name=".LaunchVPN" android:autoRemoveFromRecents="true" android:excludeFromRecents="true" + android:noHistory="true" android:label="@string/vpn_launch_title" android:taskAffinity="" android:theme="@android:style/Theme.NoDisplay" diff --git a/main/src/main/java/de/blinkt/openvpn/LaunchVPN.java b/main/src/main/java/de/blinkt/openvpn/LaunchVPN.java index 152755a5..7ac5cc11 100644 --- a/main/src/main/java/de/blinkt/openvpn/LaunchVPN.java +++ b/main/src/main/java/de/blinkt/openvpn/LaunchVPN.java @@ -79,12 +79,11 @@ public class LaunchVPN extends Activity { super.onCreate(icicle); mPM =ProfileManager.getInstance(this); - + startVpnFromIntent(); + finish(); } - @Override - protected void onStart() { - super.onStart(); + protected void startVpnFromIntent() { // Resolve the intent final Intent intent = getIntent(); diff --git a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java index 4eba8e64..168dd080 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java +++ b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java @@ -372,7 +372,7 @@ public class VpnStatus { public boolean verify() { if (mLevel == null) return false; - + if (mMessage == null && mRessourceId == 0) return false; -- cgit v1.2.3