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 | 0f4891bf42455d634e9b013e4bf09672ac1586d2 (patch) | |
tree | 17128ab6f693202652979190e05ab8af096a518b /src/de/blinkt/openvpn/NetworkSateReceiver.java | |
parent | 701534f7cf7f9d39917841190f46b0c8aa93fcd4 (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;
}
|