summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyBerta <richy@cyborgsociety.org>2013-11-14 07:03:18 +0100
committercyBerta <richy@cyborgsociety.org>2013-11-14 07:03:18 +0100
commit7189ef37c5d5973a76ea5cdbc69d826b1abaae63 (patch)
treee02579496f8d818e529b46a89900634a162c2fa3
parent3e555f14ee57d1ce7c8f1930e75b4ef9a2d44ca1 (diff)
status message string from resource, clearer status message for 'not running', bugfix for bug #4477
-rwxr-xr-xres/values/strings.xml3
-rw-r--r--src/se/leap/bitmaskclient/EipServiceFragment.java12
2 files changed, 10 insertions, 5 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 39c82d40..2fdfc154 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -319,5 +319,6 @@
<string name="eip_cancel_connect_text">There is a connection attempt in progress. Do you wish to cancel it?</string>
<string name="eip_cancel_connect_cancel">Yes</string>
<string name="eip_cancel_connect_false">No</string>
-
+ <string name="eip_state_not_connected">"Not running! Connection not secure!"</string>
+ <string name="eip_state_connected">Connection Secure.</string>
</resources>
diff --git a/src/se/leap/bitmaskclient/EipServiceFragment.java b/src/se/leap/bitmaskclient/EipServiceFragment.java
index daf446a5..1b2cfb20 100644
--- a/src/se/leap/bitmaskclient/EipServiceFragment.java
+++ b/src/se/leap/bitmaskclient/EipServiceFragment.java
@@ -132,6 +132,7 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli
@Override
public void onClick(DialogInterface dialog, int which) {
eipCommand(EIP.ACTION_STOP_EIP);
+ mEipStartPending = false;
}
})
.setNegativeButton(getResources().getString(R.string.eip_cancel_connect_false), new DialogInterface.OnClickListener() {
@@ -177,18 +178,21 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli
String statusMessage = "";
String prefix = getString(localizedResId);
if (state.equals("CONNECTED")){
- statusMessage = "Connection Secure";
+ statusMessage = getString(R.string.eip_state_connected);
getActivity().findViewById(R.id.eipProgress).setVisibility(View.GONE);
mEipStartPending = false;
} else if (state.equals("BYTECOUNT")) {
statusMessage = logmessage;
} else if ( (state.equals("NOPROCESS") && !mEipStartPending ) || state.equals("EXITING")) {
- statusMessage = "Not running! Connection not secure!";
+ statusMessage = getString(R.string.eip_state_not_connected);
getActivity().findViewById(R.id.eipProgress).setVisibility(View.GONE);
mEipStartPending = false;
switchState = false;
- } else {
- statusMessage = prefix + logmessage;
+ } else if (state.equals("NOPROCESS")){
+ statusMessage = logmessage;
+ }
+ else {
+ statusMessage = prefix + " " + logmessage;
}
eipAutoSwitched = true;