summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/Provider.java
diff options
context:
space:
mode:
authorSean Leonard <meanderingcode@aetherislands.net>2013-10-03 16:38:14 -0700
committerSean Leonard <meanderingcode@aetherislands.net>2013-10-03 16:38:14 -0700
commit697e7da6e1379ac23cd8dbb47a1246547abafda6 (patch)
tree07f7d05616c4c2d3a0425c96cc6ed8fc83f19d38 /src/se/leap/leapclient/Provider.java
parent6112dcbb6a430651f172a7a07f2e9b7633299705 (diff)
parent83f18ec709d71d843155a8df853b014e5a599c01 (diff)
Merge branch 'feature/move-confighelper-constants' into develop
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", "") );