diff options
author | Arne Schwabe <arne@rfc2549.org> | 2018-04-01 11:25:47 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2018-04-01 11:25:47 +0200 |
commit | 0db69bbeed93c59e6643d2f392721050a3c30064 (patch) | |
tree | a0eabd73fa7fbe6ae3a9d11c8c59cefe4c9049bc | |
parent | ef11491386bd770e9eac1fe06cb0037c1c0f1455 (diff) |
Fix logging of Orbot status
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java | 10 |
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
|