diff options
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/EIP.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/EIP.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EIP.java b/app/src/main/java/se/leap/bitmaskclient/EIP.java index add5a1d1..0197692b 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/EIP.java @@ -185,16 +185,18 @@ public final class EIP extends IntentService { * Intent to {@link se.leap.openvpn.LaunchVPN} */ private void startEIP() { - activeGateway = selectGateway(); earlyRoutes(); + activeGateway = selectGateway(); + if(activeGateway != null && activeGateway.mVpnProfile != null) { launchActiveGateway(); } } private void earlyRoutes() { - VoidVpnService voidVpn = new VoidVpnService(); - voidVpn.setUp(context); + Intent void_vpn_launcher = new Intent(context, VoidVpnLauncher.class); + void_vpn_launcher.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + startActivity(void_vpn_launcher); } private void launchActiveGateway() { |