summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2015-03-19 15:16:25 +0100
committerArne Schwabe <arne@rfc2549.org>2015-03-19 15:16:25 +0100
commitea8c819949d3f3eeb77587d78eef24d94732e8d5 (patch)
tree2f6a3aa04cc05192b5dd428841f239804b804251
parentb05d9f664f489c963ccd9bd69f7c1014bcc8a9c6 (diff)
Fix formatting of log messages if no context is available (Closes schwabe/ics-openvpn-old-repo-do-not-use#13)
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java10
1 files changed, 7 insertions, 3 deletions
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;
}