summaryrefslogtreecommitdiff
path: root/src/de/blinkt
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/blinkt')
-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) {