summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/Provider.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-09-05 17:40:36 +0200
committerParménides GV <parmegv@sdf.org>2013-09-30 11:31:55 +0200
commitfdc8d5376c6d44c2a78ee023e89417cddabfbd44 (patch)
tree619e2790d2fc2f56cce51e97db6472b8832e34ed /src/se/leap/leapclient/Provider.java
parent571b935f6ef8a3662fb506d3228efbfced6f24af (diff)
Moved all constants from ConfigHelper.
They have been relocated to the corresponding classes.
Diffstat (limited to 'src/se/leap/leapclient/Provider.java')
-rw-r--r--src/se/leap/leapclient/Provider.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/se/leap/leapclient/Provider.java b/src/se/leap/leapclient/Provider.java
index cdcd56c5..2846ea60 100644
--- a/src/se/leap/leapclient/Provider.java
+++ b/src/se/leap/leapclient/Provider.java
@@ -42,7 +42,21 @@ public final class Provider implements Serializable {
private static SharedPreferences preferences = null;
// Represents our Provider's provider.json
private static JSONObject definition = null;
-
+
+ final public static String
+ API_URL = "api_uri",
+ API_VERSION = "api_version",
+ ALLOW_REGISTRATION = "allow_registration",
+ API_RETURN_SERIAL = "serial",
+ SERVICE = "service",
+ KEY = "provider",
+ CA_CERT = "ca_cert",
+ NAME = "name",
+ DESCRIPTION = "description",
+ DOMAIN = "domain",
+ MAIN_URL = "main_url",
+ DOT_JSON_URL = "provider_json_url"
+ ;
// Array of what API versions we understand
protected static final String[] API_VERSIONS = {"1"}; // I assume we might encounter arbitrary version "numbers"
@@ -82,7 +96,7 @@ public final class Provider implements Serializable {
//preferences = context.getgetPreferences(0); // 0 == MODE_PRIVATE, but we don't extend Android's classes...
// Load SharedPreferences
- preferences = activity.getSharedPreferences(ConfigHelper.PREFERENCES_KEY,Context.MODE_PRIVATE);
+ preferences = activity.getSharedPreferences(Dashboard.SHARED_PREFERENCES,Context.MODE_PRIVATE);
// Inflate our provider.json data
try {
definition = new JSONObject( preferences.getString("provider", "") );