diff options
author | cyBerta <cyberta@riseup.net> | 2023-10-29 15:58:52 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-10-29 15:58:52 +0100 |
commit | 50defeaff2a8468ee44db7e09752e334e4d1ba2c (patch) | |
tree | cca77a33f5b3266b9b0462136057ae47f6b146d4 /main/src/ui/java/de/blinkt/openvpn/OpenVPNTileService.java | |
parent | 45f67a08b481f2f727556a36e28d17a3f68d435a (diff) | |
parent | 87aac67b611f616aebfb722679b40e3f49576f01 (diff) |
Merge branch 'schwabe_master' into ssh_new_master
Diffstat (limited to 'main/src/ui/java/de/blinkt/openvpn/OpenVPNTileService.java')
-rw-r--r-- | main/src/ui/java/de/blinkt/openvpn/OpenVPNTileService.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/main/src/ui/java/de/blinkt/openvpn/OpenVPNTileService.java b/main/src/ui/java/de/blinkt/openvpn/OpenVPNTileService.java index 1c5dd0e5..94c1f1db 100644 --- a/main/src/ui/java/de/blinkt/openvpn/OpenVPNTileService.java +++ b/main/src/ui/java/de/blinkt/openvpn/OpenVPNTileService.java @@ -7,7 +7,6 @@ package de.blinkt.openvpn; import android.annotation.SuppressLint; import android.annotation.TargetApi; -import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; import android.content.Intent; @@ -23,6 +22,7 @@ import de.blinkt.openvpn.core.ConnectionStatus; import de.blinkt.openvpn.core.IOpenVPNServiceInternal; import de.blinkt.openvpn.core.OpenVPNService; import de.blinkt.openvpn.core.ProfileManager; +import de.blinkt.openvpn.core.VPNLaunchHelper; import de.blinkt.openvpn.core.VpnStatus; @@ -85,13 +85,7 @@ public class OpenVPNTileService extends TileService implements VpnStatus.StateLi @SuppressLint("Override") @TargetApi(Build.VERSION_CODES.N) void launchVPN(VpnProfile profile, Context context) { - Intent startVpnIntent = new Intent(Intent.ACTION_MAIN); - startVpnIntent.setClass(context, LaunchVPN.class); - startVpnIntent.putExtra(LaunchVPN.EXTRA_KEY, profile.getUUIDString()); - startVpnIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - startVpnIntent.putExtra(LaunchVPN.EXTRA_HIDELOG, true); - - context.startActivity(startVpnIntent); + VPNLaunchHelper.startOpenVpn(profile, getBaseContext(), "QuickTile"); } @TargetApi(Build.VERSION_CODES.N) |