summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/core
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-04-16 20:17:45 +0200
committerArne Schwabe <arne@rfc2549.org>2013-04-16 20:17:45 +0200
commit7e3671e2bd04c0695d8b5bbdb1fe33b888253552 (patch)
treef320bd26e0ce563238aa21f5af8843371d22f989 /src/de/blinkt/openvpn/core
parentc916abb6d015496cceb38c65d6912ec4454251cd (diff)
Add states when requiring user input
Diffstat (limited to 'src/de/blinkt/openvpn/core')
-rw-r--r--src/de/blinkt/openvpn/core/OpenVPN.java3
-rw-r--r--src/de/blinkt/openvpn/core/OpenVpnService.java6
2 files changed, 7 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/core/OpenVPN.java b/src/de/blinkt/openvpn/core/OpenVPN.java
index 2bc4cf6b..982a1e62 100644
--- a/src/de/blinkt/openvpn/core/OpenVPN.java
+++ b/src/de/blinkt/openvpn/core/OpenVPN.java
@@ -44,7 +44,8 @@ public class OpenVPN {
public enum ConnectionStatus {
LEVEL_NONETWORK (3),
LEVEL_NOTCONNECTED (4),
- LEVEL_AUTH_FAILED ( 5),
+ LEVEL_AUTH_FAILED (5),
+ LEVEL_WAITING_FOR_USER_INPUT (6),
LEVEL_CONNECTING_SERVER_REPLIED ( 1),
LEVEL_CONNECTING_NO_SERVER_REPLY_YET (2),
LEVEL_CONNECTED (0), UNKNOWN_LEVEL(-1);
diff --git a/src/de/blinkt/openvpn/core/OpenVpnService.java b/src/de/blinkt/openvpn/core/OpenVpnService.java
index 4dba80f1..d86ae92b 100644
--- a/src/de/blinkt/openvpn/core/OpenVpnService.java
+++ b/src/de/blinkt/openvpn/core/OpenVpnService.java
@@ -541,7 +541,11 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
// Display byte count only after being connected
{
- if(level == ConnectionStatus.LEVEL_CONNECTED) {
+ if (level == ConnectionStatus.LEVEL_WAITING_FOR_USER_INPUT) {
+ // The user is presented a dialog of some kind, no need to inform the user
+ // with a notifcation
+ return;
+ } else if(level == ConnectionStatus.LEVEL_CONNECTED) {
mDisplayBytecount = true;
mConnecttime = System.currentTimeMillis();
} else {