diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-05-29 21:40:19 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-05-29 21:40:19 +0200 |
commit | 8d3fa2909e748d924401e58d0ab5cfff63e46ccf (patch) | |
tree | fb56764e9e6acc5312a2fddc853d68e9d0c580cd /src/de/blinkt/openvpn/core | |
parent | 9288f9cdcb85f00918614595a1b81775a8d9e607 (diff) |
Compile fixes
Diffstat (limited to 'src/de/blinkt/openvpn/core')
-rw-r--r-- | src/de/blinkt/openvpn/core/DeviceStateReceiver.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/de/blinkt/openvpn/core/DeviceStateReceiver.java b/src/de/blinkt/openvpn/core/DeviceStateReceiver.java index 479860bc..7d6e80db 100644 --- a/src/de/blinkt/openvpn/core/DeviceStateReceiver.java +++ b/src/de/blinkt/openvpn/core/DeviceStateReceiver.java @@ -1,7 +1,5 @@ package de.blinkt.openvpn.core;
-import java.util.LinkedList;
-
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -14,6 +12,8 @@ import android.util.Log; import de.blinkt.openvpn.R;
import de.blinkt.openvpn.core.OpenVPN.ByteCountListener;
+import java.util.LinkedList;
+
public class DeviceStateReceiver extends BroadcastReceiver implements ByteCountListener {
private int lastNetwork=-1;
private OpenVPNMangement mManangement;
@@ -104,9 +104,7 @@ public class DeviceStateReceiver extends BroadcastReceiver implements ByteCountL fillTrafficData();
if (network == connectState.DISCONNECTED)
screen = connectState.DISCONNECTED;
- }
-
- } else if (Intent.ACTION_SCREEN_ON.equals(intent.getAction())) {
+ } else if (Intent.ACTION_SCREEN_ON.equals(intent.getAction())) {
// Network was disabled because screen off
if (screen == connectState.DISCONNECTED && network == connectState.SHOULDBECONNECTED) {
mManangement.resume();
@@ -129,9 +127,9 @@ public class DeviceStateReceiver extends BroadcastReceiver implements ByteCountL String netstatestring;
- if(networkInfo==null)
+ if(networkInfo==null) {
netstatestring = "not connected";
- else {
+ } else {
String subtype = networkInfo.getSubtypeName();
if(subtype==null)
subtype = "";
@@ -197,7 +195,6 @@ public class DeviceStateReceiver extends BroadcastReceiver implements ByteCountL ConnectivityManager conn = (ConnectivityManager)
context.getSystemService(Context.CONNECTIVITY_SERVICE);
- NetworkInfo networkInfo = conn.getActiveNetworkInfo();
- return networkInfo;
+ return conn.getActiveNetworkInfo();
}
}
|