From 0db69bbeed93c59e6643d2f392721050a3c30064 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sun, 1 Apr 2018 11:25:47 +0200 Subject: Fix logging of Orbot status --- .../java/de/blinkt/openvpn/core/OpenVpnManagementThread.java | 10 ++++++---- 1 file 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 -- cgit v1.2.3