summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2018-04-01 11:25:47 +0200
committerArne Schwabe <arne@rfc2549.org>2018-04-01 11:25:47 +0200
commit0db69bbeed93c59e6643d2f392721050a3c30064 (patch)
treea0eabd73fa7fbe6ae3a9d11c8c59cefe4c9049bc
parentef11491386bd770e9eac1fe06cb0037c1c0f1455 (diff)
Fix logging of Orbot status
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
index 30c61beb..c46fe727 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
@@ -69,11 +69,13 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement {
@Override
public void onStatus(Intent statusIntent) {
- String extras = "";
- for (String key : statusIntent.getExtras().keySet())
- extras += String.format(Locale.ENGLISH, "%s - '%s'", key, statusIntent.getExtras().getString(key, "[]"));
- VpnStatus.logDebug("Got Orbot status: " + extras);
+ StringBuilder extras = new StringBuilder();
+ for (String key : statusIntent.getExtras().keySet()) {
+ Object val = statusIntent.getExtras().get(key);
+ extras.append(String.format(Locale.ENGLISH, "%s - '%s'", key, val == null ? "null" : val.toString()));
+ }
+ VpnStatus.logDebug("Got Orbot status: " + extras);
}
@Override