diff options
author | Danny Baumann <dannybaumann@web.de> | 2016-02-04 11:53:14 +0100 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2016-02-04 12:07:33 +0100 |
commit | 15b5c7316b118dfc1ae2f3f1085532f9582ecd1d (patch) | |
tree | 1328f38a41bdeda917172a0b88c84203db665385 /main | |
parent | 2fe0c6581fa271aa990ed1df051d27ff1460d2ed (diff) |
Don't add colon postfix if not required.
Diffstat (limited to 'main')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java | 9 |
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; |