From 99b65032fae646293a6e7ddeaa8553d9e0590f3d Mon Sep 17 00:00:00 2001 From: Sean Leonard Date: Tue, 2 Jul 2013 22:57:27 -0600 Subject: Display provider domain on Dashboard instead of name --- src/se/leap/leapclient/Provider.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/se/leap/leapclient/Provider.java') diff --git a/src/se/leap/leapclient/Provider.java b/src/se/leap/leapclient/Provider.java index 189c3a84..72184eb0 100644 --- a/src/se/leap/leapclient/Provider.java +++ b/src/se/leap/leapclient/Provider.java @@ -36,6 +36,7 @@ public final class Provider implements Serializable { // Some API pieces we want to know about private static final String API_TERM_SERVICES = "services"; private static final String API_TERM_NAME = "name"; + private static final String API_TERM_DOMAIN = "domain"; private static final String API_TERM_DEFAULT_LANGUAGE = "default_language"; protected static final String[] API_EIP_TYPES = {"openvpn"}; @@ -79,6 +80,17 @@ public final class Provider implements Serializable { } } + protected String getDomain(){ + String domain = "Null"; + try { + domain = definition.getString(API_TERM_DOMAIN); + } catch (JSONException e) { + domain = "Null"; + e.printStackTrace(); + } + return domain; + } + protected String getName(){ // Should we pass the locale in, or query the system here? String lang = Locale.getDefault().getLanguage(); -- cgit v1.2.3