summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-02-27 00:36:11 +0100
committercyBerta <cyberta@riseup.net>2021-02-28 11:10:04 +0100
commit04000ea89257cb5d3141be9dfc18f96ad8a2ea96 (patch)
tree5b843100dbedf46ea78bd037802b9771ccaf73a3 /app/src
parent2ace1e224bc15481dcaf4cfa46272adf7c01bdd8 (diff)
no need to delete notification channels on service destroy
Diffstat (limited to 'app/src')
-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);
}