summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/NetworkSateReceiver.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-06-13 23:23:49 +0200
committerArne Schwabe <arne@rfc2549.org>2012-06-13 23:23:49 +0200
commit0f4891bf42455d634e9b013e4bf09672ac1586d2 (patch)
tree17128ab6f693202652979190e05ab8af096a518b /src/de/blinkt/openvpn/NetworkSateReceiver.java
parent701534f7cf7f9d39917841190f46b0c8aa93fcd4 (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.java12
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;
}