summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java3
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/VpnNotificationManager.java4
2 files changed, 6 insertions, 1 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 575f1f59..b38eeb14 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -277,6 +277,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
// Always show notification here to avoid problem with startForeground timeout
notificationManager.createOpenVpnNotificationChannel();
notificationManager.buildForegroundServiceNotification(EipStatus.getInstance().getLevel(), this::onNotificationBuild);
+ notificationManager.cancelVoidVpnServiceNotifications();
}
@Override
@@ -329,7 +330,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
updateShortCutUsage(mProfile);
}
VpnStatus.setAlwaysOn(false);
-
+ notificationManager.cancelVoidVpnServiceNotifications();
} else {
/* The intent is null when we are set as always-on or the service has been restarted. */
Log.d(TAG, "Starting VPN due to isAlwaysOn system settings or app crash.");
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VpnNotificationManager.java b/app/src/main/java/se/leap/bitmaskclient/eip/VpnNotificationManager.java
index b4d11f26..f32dc240 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnNotificationManager.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnNotificationManager.java
@@ -200,6 +200,10 @@ public class VpnNotificationManager {
compatNotificationManager.cancel(VoidVpnService.NOTIFICATION_CHANNEL_NEWSTATUS_ID.hashCode());
}
+ public void cancelVoidVpnServiceNotifications() {
+ compatNotificationManager.cancel(VoidVpnService.NOTIFICATION_CHANNEL_NEWSTATUS_ID.hashCode());
+ }
+
@TargetApi(O)
public void createVoidVpnNotificationChannel() {