summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java4
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java2
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/VpnNotificationManager.java8
3 files changed, 3 insertions, 11 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 a734dd90..9ed2054e 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -8,12 +8,10 @@ package de.blinkt.openvpn.core;
import android.Manifest.permission;
import android.annotation.TargetApi;
import android.app.Notification;
-import android.app.UiModeManager;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ShortcutManager;
-import android.content.res.Configuration;
import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.net.VpnService;
@@ -538,7 +536,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
VpnStatus.removeStateListener(this);
VpnStatus.flushLog();
firewallManager.onDestroy();
- notificationManager.deleteOpenvpnNotificationChannel();
+ notificationManager.cancelAll();
}
private String getTunConfigString() {
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 68ad78e4..02de7574 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java
@@ -119,7 +119,7 @@ public class VoidVpnService extends VpnService implements Observer, VpnNotificat
@Override
public void onDestroy() {
super.onDestroy();
- notificationManager.deleteVoidVpnNotificationChannel();
+ notificationManager.cancelAll();
}
private void stop() {
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 b007715b..6fac0f72 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnNotificationManager.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnNotificationManager.java
@@ -195,14 +195,8 @@ public class VpnNotificationManager {
buildOpenVpnNotification(profileName, isObfuscated, msg, tickerText, status, when, notificationChannelNewstatusId, null);
}
- public void deleteOpenvpnNotificationChannel() {
+ public void cancelAll() {
compatNotificationManager.cancelAll();
- compatNotificationManager.deleteNotificationChannel(OpenVPNService.NOTIFICATION_CHANNEL_NEWSTATUS_ID);
- }
-
- public void deleteVoidVpnNotificationChannel() {
- compatNotificationManager.cancelAll();
- compatNotificationManager.deleteNotificationChannel(VoidVpnService.NOTIFICATION_CHANNEL_NEWSTATUS_ID);
}