diff options
author | Sean Leonard <meanderingcode@aetherislands.net> | 2013-07-10 11:17:03 -0600 |
---|---|---|
committer | Sean Leonard <meanderingcode@aetherislands.net> | 2013-07-19 15:09:14 -0600 |
commit | 6614dface821c5f975dba47bc6150783c25ee468 (patch) | |
tree | a7988f5906c1a0e554f4aaa8b4079e7dcba2a328 | |
parent | 25313f3f444516a1aad2f4687792bc9073601920 (diff) |
Better VPN connection state messages
-rw-r--r-- | src/se/leap/leapclient/Dashboard.java | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/se/leap/leapclient/Dashboard.java b/src/se/leap/leapclient/Dashboard.java index 1b6b8e38..b58f4952 100644 --- a/src/se/leap/leapclient/Dashboard.java +++ b/src/se/leap/leapclient/Dashboard.java @@ -427,16 +427,25 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf @Override public void updateState(final String state, final String logmessage, final int localizedResId) { // Note: "states" are not organized anywhere...collected state strings: - // NOPROCESS,NONETWORK,BYTECOUNT,AUTH_FAILED + some parsing thing ( WAIT(?),AUTH,GET_CONFIG,ASSIGN_IP,CONNECTED(?) ) + // NOPROCESS,NONETWORK,BYTECOUNT,AUTH_FAILED + some parsing thing ( WAIT(?),AUTH,GET_CONFIG,ASSIGN_IP,CONNECTED,SIGINT ) runOnUiThread(new Runnable() { @Override public void run() { if (eipStatus != null) { - String prefix = getString(localizedResId) + ":"; - if (state.equals("BYTECOUNT") || state.equals("NOPROCESS")) - prefix = ""; - eipStatus.setText(prefix + logmessage); + String statusMessage = ""; + String prefix = getString(localizedResId); + if (state.equals("CONNECTED")){ + statusMessage = "Connection Secure"; + } else if (state.equals("BYTECOUNT")) { + statusMessage = logmessage; + } else if (state.equals("NOPROCESS") || state.equals("EXITING")) { + statusMessage = "Not running! Connection not secure!"; + } else { + statusMessage = prefix + logmessage; + } + + eipStatus.setText(statusMessage); } } }); |