From c4df01ab94c85ecf4a106b187a03e4859a857b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 7 Oct 2014 21:17:12 +0200 Subject: Set up early routes on boot too. --- app/src/main/java/se/leap/bitmaskclient/EIP.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/se/leap/bitmaskclient/EIP.java') 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() { -- cgit v1.2.3