summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-06-04 20:17:43 +0200
committerParménides GV <parmegv@sdf.org>2015-06-04 20:17:43 +0200
commitffb6d2fe8ddd69f0e7239fa9505dc255eed6b348 (patch)
tree38d724b9f9b324df85ac78c9bb9572050ed1f7cd /app/src
parent8b81657a9cb04fa29307f677747614f023576cbf (diff)
Updated bitmask branch from ics-openvpn fork, second notification
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java9
1 files changed, 6 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 ed3a5446..f9cb9a86 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -172,7 +172,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
mNotificationManager.notify(OPENVPN_STATUS, notification);
- startForeground(OPENVPN_STATUS, notification);
+ //startForeground(OPENVPN_STATUS, notification);
}
private int getIconByConnectionStatus(ConnectionStatus level) {
@@ -840,6 +840,9 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
mDisplayBytecount = true;
mConnecttime = System.currentTimeMillis();
lowpriority = true;
+ String ns = Context.NOTIFICATION_SERVICE;
+ NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);
+ mNotificationManager.cancel(OPENVPN_STATUS);
} else {
mDisplayBytecount = false;
}
@@ -849,7 +852,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
// CONNECTED
// Does not work :(
String msg = getString(resid);
- showNotification(msg + " " + logmessage, msg, lowpriority, 0, level);
+ // showNotification(msg + " " + logmessage, msg, lowpriority, 0, level);
}
}
@@ -872,7 +875,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
humanReadableByteCount(diffOut / OpenVPNManagement.mBytecountInterval, true));
boolean lowpriority = !mNotificationAlwaysVisible;
- showNotification(netstat, null, lowpriority, mConnecttime, LEVEL_CONNECTED);
+ //showNotification(netstat, null, lowpriority, mConnecttime, LEVEL_CONNECTED);
}
}