summaryrefslogtreecommitdiff
path: root/app/src/main/java/de
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2017-10-02 17:53:35 +0200
committercyBerta <cyberta@riseup.net>2017-10-13 12:47:11 +0200
commit11a11f25e0981d51dd19ee3e7849de1a9f563ec4 (patch)
tree823938fd9a505bea03582cadcf6790646204a4be /app/src/main/java/de
parentadc6f7672c380d534fc963d868fe5aebcab54b4a (diff)
#8759 one cancellation dialog should be sufficient
Diffstat (limited to 'app/src/main/java/de')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
index 5faa1de4..835e69b3 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -322,9 +322,11 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
}
- Intent disconnectVPN = new Intent(this, DisconnectVPN.class);
- disconnectVPN.setAction(DISCONNECT_VPN);
- PendingIntent disconnectPendingIntent = PendingIntent.getActivity(this, 0, disconnectVPN, 0);
+ Intent disconnectVPN = new Intent(this, Dashboard.class);
+ disconnectVPN.putExtra(Dashboard.ACTION_ASK_TO_CANCEL_VPN, true);
+ disconnectVPN.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
+ Intent.FLAG_ACTIVITY_SINGLE_TOP);
+ PendingIntent disconnectPendingIntent = PendingIntent.getActivity(this, 0, disconnectVPN, PendingIntent.FLAG_CANCEL_CURRENT);
nbuilder.addAction(R.drawable.ic_menu_close_clear_cancel,
getString(R.string.cancel_connection), disconnectPendingIntent);