From 15b5c7316b118dfc1ae2f3f1085532f9582ecd1d Mon Sep 17 00:00:00 2001 From: Danny Baumann Date: Thu, 4 Feb 2016 11:53:14 +0100 Subject: Don't add colon postfix if not required. --- main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java | 9 ++++++--- 1 file changed, 6 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 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; -- cgit v1.2.3