diff options
author | Parménides GV <parmegv@sdf.org> | 2015-06-10 19:41:15 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2015-06-10 19:41:15 +0200 |
commit | 46638f7101e752be76bcafe061f4b5e68ee88088 (patch) | |
tree | 372e00e6111525beb143e00c05e40d3ba3b8aabc /app/src/main | |
parent | d59a4ad7a4094e5f7782b758fdfd13653afe5288 (diff) | |
parent | 07745ed137cb8d546c1d1b1e94714518e9df7887 (diff) |
Merge branch 'bug/if-you-don't-trust-this-application-it-still-tries-to-connect-(android)-#6115' into develop
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/LaunchVPN.java | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java b/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java index f1d769e1..90216a70 100644 --- a/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java +++ b/app/src/main/java/de/blinkt/openvpn/LaunchVPN.java @@ -121,18 +121,20 @@ public class LaunchVPN extends Activity { super.onActivityResult(requestCode, resultCode, data); if(requestCode==START_VPN_PROFILE) { - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); - boolean showLogWindow = prefs.getBoolean("showlogwindow", true); - - if(!mhideLog && showLogWindow) - showLogWindow(); - new startOpenVpnThread().start(); - } else if (resultCode == Activity.RESULT_CANCELED) { - // User does not want us to start, so we just vanish - VpnStatus.updateStateString("USER_VPN_PERMISSION_CANCELLED", "", R.string.state_user_vpn_permission_cancelled, - ConnectionStatus.LEVEL_NOTCONNECTED); - - finish(); + if(resultCode == Activity.RESULT_OK) { + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); + boolean showLogWindow = prefs.getBoolean("showlogwindow", true); + + if(!mhideLog && showLogWindow) + showLogWindow(); + new startOpenVpnThread().start(); + } else if (resultCode == Activity.RESULT_CANCELED) { + // User does not want us to start, so we just vanish + VpnStatus.updateStateString("USER_VPN_PERMISSION_CANCELLED", "", R.string.state_user_vpn_permission_cancelled, + ConnectionStatus.LEVEL_NOTCONNECTED); + + finish(); + } } } |