diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/api/ExternalOpenVPNService.java | 8 |
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 {
|