summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-06-23 22:36:43 +0200
committerArne Schwabe <arne@rfc2549.org>2013-06-23 22:36:43 +0200
commit7c19e840d5ea58313545ad7fd58b00202b60aec8 (patch)
tree857cd126fccc0065b85036c708bc40d511a2549d /src/de/blinkt/openvpn
parent3ae7e2a9cb06f5ddd67b1a9d8a57f8f662028422 (diff)
Fix bug with new pause VPN function
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r--src/de/blinkt/openvpn/core/DeviceStateReceiver.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/core/DeviceStateReceiver.java b/src/de/blinkt/openvpn/core/DeviceStateReceiver.java
index ecdf5c55..cf7493a0 100644
--- a/src/de/blinkt/openvpn/core/DeviceStateReceiver.java
+++ b/src/de/blinkt/openvpn/core/DeviceStateReceiver.java
@@ -124,7 +124,7 @@ public class DeviceStateReceiver extends BroadcastReceiver implements ByteCountL
/* should be connected has changed because the screen is on now, connect the VPN */
if (shouldBeConnected() != connected)
mManagement.resume();
- else
+ else if (!shouldBeConnected())
/*Update the reason why we are still paused */
mManagement.pause(getPauseReason());
@@ -224,7 +224,10 @@ public class DeviceStateReceiver extends BroadcastReceiver implements ByteCountL
if (screen == connectState.DISCONNECTED)
return pauseReason.screenOff;
- return pauseReason.noNetwork;
+ if (network == connectState.DISCONNECTED)
+ return pauseReason.noNetwork;
+
+ assert(false);
}
private NetworkInfo getCurrentNetworkInfo(Context context) {