diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-06-23 22:36:43 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-06-23 22:36:43 +0200 |
commit | 7c19e840d5ea58313545ad7fd58b00202b60aec8 (patch) | |
tree | 857cd126fccc0065b85036c708bc40d511a2549d /src/de/blinkt/openvpn | |
parent | 3ae7e2a9cb06f5ddd67b1a9d8a57f8f662028422 (diff) |
Fix bug with new pause VPN function
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r-- | src/de/blinkt/openvpn/core/DeviceStateReceiver.java | 7 |
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) {
|