From 17ce27727c3b002f4c6fe242eb4380ad42725868 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 23 Dec 2022 15:05:30 +0100 Subject: always-on might also restart the VoidVPNService without an intent, always create a foreground notification --- app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java b/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java index fbfa2a1d..79876d50 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java @@ -91,7 +91,7 @@ public class VoidVpnService extends VpnService implements Observer, VpnNotificat } }); thread.run(); - } else if (action.equals("android.net.VpnService") && Build.VERSION.SDK_INT >= ALWAYS_ON_MIN_API_LEVEL) { + } else if (intent == null || action.equals("android.net.VpnService") && Build.VERSION.SDK_INT >= ALWAYS_ON_MIN_API_LEVEL) { //only always-on feature triggers this startWithForegroundNotification(); thread = new Thread(new Runnable() { -- cgit v1.2.3