From ea8c819949d3f3eeb77587d78eef24d94732e8d5 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Thu, 19 Mar 2015 15:16:25 +0100 Subject: Fix formatting of log messages if no context is available (Closes schwabe/ics-openvpn-old-repo-do-not-use#13) --- main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'main') diff --git a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java index d1269380..73f9dff5 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java +++ b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java @@ -14,6 +14,10 @@ import android.content.pm.Signature; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; +import android.text.TextUtils; + +import org.w3c.dom.Text; + import de.blinkt.openvpn.R; import java.io.ByteArrayInputStream; @@ -218,12 +222,12 @@ public class VpnStatus { if(mArgs == null) return c.getString(mRessourceId); else - return c.getString(mRessourceId,mArgs); + return c.getString(mRessourceId, mArgs); } else { String str = String.format(Locale.ENGLISH,"Log (no context) resid %d", mRessourceId); if(mArgs !=null) - for(Object o:mArgs) - str += "|" + o.toString(); + str += TextUtils.join(" ", mArgs); + return str; } -- cgit v1.2.3