summaryrefslogtreecommitdiff
path: root/src/se/leap/bitmaskclient/EIP.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/se/leap/bitmaskclient/EIP.java')
-rw-r--r--src/se/leap/bitmaskclient/EIP.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/se/leap/bitmaskclient/EIP.java b/src/se/leap/bitmaskclient/EIP.java
index ec2f6972..2b7fd39f 100644
--- a/src/se/leap/bitmaskclient/EIP.java
+++ b/src/se/leap/bitmaskclient/EIP.java
@@ -58,10 +58,10 @@ import android.util.Log;
*/
public final class EIP extends IntentService {
+ public final static String AUTHED_EIP = "authed eip";
public final static String ACTION_START_EIP = "se.leap.bitmaskclient.START_EIP";
public final static String ACTION_STOP_EIP = "se.leap.bitmaskclient.STOP_EIP";
public final static String ACTION_UPDATE_EIP_SERVICE = "se.leap.bitmaskclient.UPDATE_EIP_SERVICE";
- public final static String AUTHED_EIP = "authed_eip";
public final static String ACTION_IS_EIP_RUNNING = "se.leap.bitmaskclient.IS_RUNNING";
public final static String EIP_NOTIFICATION = "EIP_NOTIFICATION";
public final static String ALLOWED_ANON = "allow_anonymous";
@@ -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;