From ffb6d2fe8ddd69f0e7239fa9505dc255eed6b348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 4 Jun 2015 20:17:43 +0200 Subject: Updated bitmask branch from ics-openvpn fork, second notification --- .gitmodules | 2 +- app/build.gradle | 1 + app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 9 ++++++--- ics-openvpn | 2 +- 4 files changed, 9 insertions(+), 5 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 index 7be8453c..b68d72b6 160000 --- a/ics-openvpn +++ b/ics-openvpn @@ -1 +1 @@ -Subproject commit 7be8453cc28c8784c2f95dcec24d01c16af122f8 +Subproject commit b68d72b65d0113e3ae564b82c0cbb83ce0c296d3 -- cgit v1.2.3