diff options
author | Parménides GV <parmegv@sdf.org> | 2013-12-19 21:11:22 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-12-19 21:11:22 +0100 |
commit | 3f5d756fa1a37dba00c400ca2a6197af5af1071e (patch) | |
tree | 3abe8236fe9789b0aebcf50b4cf3c7ebfe0605e1 /src/se/leap/bitmaskclient | |
parent | 0669d0bb7c3c50d5ed042564fb3218bdb8237b19 (diff) | |
parent | 4d9b896481594297421a157a5906b5a8ead48ab6 (diff) |
Merge branch 'feature/UI_improvements' into develop
Diffstat (limited to 'src/se/leap/bitmaskclient')
-rw-r--r-- | src/se/leap/bitmaskclient/EIP.java | 14 | ||||
-rw-r--r-- | src/se/leap/bitmaskclient/EipServiceFragment.java | 5 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/se/leap/bitmaskclient/EIP.java b/src/se/leap/bitmaskclient/EIP.java index ec2f6972..edd73e83 100644 --- a/src/se/leap/bitmaskclient/EIP.java +++ b/src/se/leap/bitmaskclient/EIP.java @@ -439,7 +439,8 @@ public final class EIP extends IntentService { String ports = "ports"; String protos = "protocols"; String capabilities = "capabilities"; - String location = "location"; + String location_key = "location"; + String locations = "locations"; Vector<String> arg = new Vector<String>(); Vector<Vector<String>> args = new Vector<Vector<String>>(); @@ -456,7 +457,6 @@ public final class EIP extends IntentService { arg.add(word); value.add( (Vector<String>) arg.clone() ); options.put(key, (Vector<Vector<String>>) value.clone()); - value.clear(); arg.clear(); } @@ -477,16 +477,22 @@ public final class EIP extends IntentService { arg.clear(); args.clear(); + try { - arg.add(location); - arg.add(mGateway.getString(location)); + + arg.add(location_key); + String locationText = ""; + locationText = eipDefinition.getJSONObject(locations).getJSONObject(mGateway.getString(location_key)).getString("name"); + arg.add(locationText); + } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } args.add((Vector<String>) arg.clone()); options.put("location", (Vector<Vector<String>>) args.clone() ); + arg.clear(); args.clear(); JSONArray protocolsJSON = null; diff --git a/src/se/leap/bitmaskclient/EipServiceFragment.java b/src/se/leap/bitmaskclient/EipServiceFragment.java index e182b3fd..b409394b 100644 --- a/src/se/leap/bitmaskclient/EipServiceFragment.java +++ b/src/se/leap/bitmaskclient/EipServiceFragment.java @@ -202,7 +202,10 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli switchState = false; } else if (state.equals("NOPROCESS")){ statusMessage = logmessage; - } else { + } else if (state.equals("ASSIGN_IP")){ //don't show assigning message in eipStatus + statusMessage = (String) eipStatus.getText(); + } + else { statusMessage = prefix + " " + logmessage; } |