diff options
-rw-r--r-- | .gitmodules | 2 | ||||
-rw-r--r-- | app/build.gradle | 1 | ||||
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 9 | ||||
m--------- | ics-openvpn | 0 |
4 files changed, 8 insertions, 4 deletions
diff --git a/.gitmodules b/.gitmodules index 9d7b6f0d..58bc41eb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "ics-openvpn"] path = ics-openvpn - url = ssh://git@github.com:parmegv/ics-openvpn.git + url = git@github.com:parmegv/ics-openvpn.git diff --git a/app/build.gradle b/app/build.gradle index dfcb2fbe..7a03ceee 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,6 +58,7 @@ task copyIcsOpenVPNClasses( type: Copy ) { println "copyIcsOpenVPNClasses" from ('../ics-openvpn/main/') { include '**/LaunchVPN.java' + include '**/OpenVPNSservice.java' include '**/VpnProfile.java' include '**/DisconnectVPN.java' include '**/VpnProfile.java' 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); } } diff --git a/ics-openvpn b/ics-openvpn -Subproject 7be8453cc28c8784c2f95dcec24d01c16af122f +Subproject b68d72b65d0113e3ae564b82c0cbb83ce0c296d |