summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2016-02-04 11:53:14 +0100
committerDanny Baumann <dannybaumann@web.de>2016-02-04 12:07:33 +0100
commit15b5c7316b118dfc1ae2f3f1085532f9582ecd1d (patch)
tree1328f38a41bdeda917172a0b88c84203db665385 /main/src
parent2fe0c6581fa271aa990ed1df051d27ff1460d2ed (diff)
Don't add colon postfix if not required.
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java9
1 files changed, 6 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 eea8d108..75163865 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
@@ -103,12 +103,15 @@ public class VpnStatus {
while (message.endsWith(","))
message = message.substring(0, message.length() - 1);
- String prefix = c.getString(mLastStateresid) + ":";
String status = mLaststate;
if (status.equals("NOPROCESS"))
- prefix = "";
+ return message;
+
+ String prefix = c.getString(mLastStateresid);
if (mLastStateresid == R.string.unknown_state)
- prefix += status;
+ message = status + message;
+ if (message.length() > 0)
+ prefix += ": ";
return prefix + message;