From 189ff47a5a60a76b80e86cab05a0d3d5b71e2996 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 30 Jun 2014 19:11:35 +0200 Subject: Allow starting profiles by uuid in the same way as inline profiles --- .../main/java/de/blinkt/openvpn/api/ExternalOpenVPNService.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main/src/main/java/de/blinkt/openvpn/api/ExternalOpenVPNService.java b/main/src/main/java/de/blinkt/openvpn/api/ExternalOpenVPNService.java index 928a85eb..b572c098 100644 --- a/main/src/main/java/de/blinkt/openvpn/api/ExternalOpenVPNService.java +++ b/main/src/main/java/de/blinkt/openvpn/api/ExternalOpenVPNService.java @@ -111,11 +111,9 @@ public class ExternalOpenVPNService extends Service implements StateListener { public void startProfile(String profileUUID) throws RemoteException { checkOpenVPNPermission(); - Intent shortVPNIntent = new Intent(Intent.ACTION_MAIN); - shortVPNIntent.setClass(getBaseContext(), de.blinkt.openvpn.LaunchVPN.class); - shortVPNIntent.putExtra(de.blinkt.openvpn.LaunchVPN.EXTRA_KEY, profileUUID); - shortVPNIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - startActivity(shortVPNIntent); + + VpnProfile vp = ProfileManager.get(getBaseContext(), profileUUID); + VPNLaunchHelper.startOpenVpn(vp, getBaseContext()); } public void startVPN(String inlineconfig) throws RemoteException { -- cgit v1.2.3