summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-06-30 19:11:35 +0200
committerArne Schwabe <arne@rfc2549.org>2014-06-30 19:11:35 +0200
commit189ff47a5a60a76b80e86cab05a0d3d5b71e2996 (patch)
treeced3418da692ef55f76e33766bdb351647202365 /main/src
parent65e33310863d46816bd1edbccf6d3fb0ab45cdee (diff)
Allow starting profiles by uuid in the same way as inline profiles
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/api/ExternalOpenVPNService.java8
1 files 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 {