diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-06-13 23:23:49 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-06-13 23:23:49 +0200 |
commit | 6709f66650ec4cc4a22d7bb4d0e809eab119cbe9 (patch) | |
tree | e67897cf3097900838ba68296b8a9a6be941b593 /src/de/blinkt/openvpn/NetworkSateReceiver.java | |
parent | 7dfa673e931656924ce4a85bec84441c46c5a5f5 (diff) |
Correct network state message
Improve logging framework a bit
Add logging of certificates received from Keystore
Diffstat (limited to 'src/de/blinkt/openvpn/NetworkSateReceiver.java')
-rw-r--r-- | src/de/blinkt/openvpn/NetworkSateReceiver.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/de/blinkt/openvpn/NetworkSateReceiver.java b/src/de/blinkt/openvpn/NetworkSateReceiver.java index 77e25acf..a8d69896 100644 --- a/src/de/blinkt/openvpn/NetworkSateReceiver.java +++ b/src/de/blinkt/openvpn/NetworkSateReceiver.java @@ -29,10 +29,14 @@ public class NetworkSateReceiver extends BroadcastReceiver { String netstatestring;
if(networkInfo==null)
- netstatestring = "null";
- else
+ netstatestring = "not connected";
+ else {
+ String subtype = networkInfo.getSubtypeName();
+ if(subtype==null)
+ subtype = "";
netstatestring = String.format("%2$s %4$s to %1$s %3$s",networkInfo.getTypeName(),
- networkInfo.getDetailedState(),networkInfo.getExtraInfo(), networkInfo.getSubtypeName());
+ networkInfo.getDetailedState(),networkInfo.getExtraInfo(),subtype );
+ }
if(networkInfo!=null && networkInfo.getState() == State.CONNECTED) {
int newnet = networkInfo.getType();
@@ -43,7 +47,7 @@ public class NetworkSateReceiver extends BroadcastReceiver { lastNetwork = newnet;
}
if(!netstatestring.equals(lastStateMsg))
- OpenVPN.logMessage(0, "Network:", netstatestring);
+ OpenVPN.logInfo(R.string.netstatus, netstatestring);
lastStateMsg=netstatestring;
}
|