summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/ConfigHelper.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-03-13 21:01:53 +0100
committerParménides GV <parmegv@sdf.org>2013-03-13 21:01:53 +0100
commit929fa9a3b7621e0a956ed8d7beffb87ed7f16249 (patch)
tree26e3dbb8c9662b63e72c096bf0a0e54edefcd49a /src/se/leap/leapclient/ConfigHelper.java
parenta8274e8b2649481f22bfc6d205d2ca7599fea065 (diff)
ConfigurationWizard sets provider.json correctly for Dashboard once a
custom provider is selected. Tested using https://bitmask.net as url for custom provider.
Diffstat (limited to 'src/se/leap/leapclient/ConfigHelper.java')
-rw-r--r--src/se/leap/leapclient/ConfigHelper.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/se/leap/leapclient/ConfigHelper.java b/src/se/leap/leapclient/ConfigHelper.java
index 5301209c..f5800a0e 100644
--- a/src/se/leap/leapclient/ConfigHelper.java
+++ b/src/se/leap/leapclient/ConfigHelper.java
@@ -17,6 +17,8 @@ import android.os.Environment;
import android.util.Log;
public class ConfigHelper {
+
+ public static SharedPreferences shared_preferences;
final static String downloadJsonFilesBundleExtra = "downloadJSONFiles";
final static String downloadNewProviderDotJSON = "downloadNewProviderDotJSON";
@@ -28,11 +30,13 @@ public class ConfigHelper {
public static String provider_key_url = "provider_main_url";
final public static String eip_service_api_path = "/config/eip-service.json";
- final public static int CUSTOM_PROVIDER_ADDED = 0;
+ final public static int CUSTOM_PROVIDER_ADDED = 0;
+ final public static int CORRECTLY_DOWNLOADED_JSON_FILES = 1;
+ final public static int INCORRECTLY_DOWNLOADED_JSON_FILES = 2;
static void saveSharedPref(String shared_preferences_key, JSONObject content) {
- SharedPreferences.Editor shared_preferences_editor = ConfigurationWizard.shared_preferences
+ SharedPreferences.Editor shared_preferences_editor = shared_preferences
.edit();
shared_preferences_editor.putString(shared_preferences_key,
content.toString());
@@ -40,7 +44,7 @@ public class ConfigHelper {
System.out.println("Shared preferences updated: key = "
+ shared_preferences_key
+ " Content = "
- + ConfigurationWizard.shared_preferences.getString(
+ + shared_preferences.getString(
shared_preferences_key, "Default"));
}
@@ -81,4 +85,9 @@ public class ConfigHelper {
}
return input_stream;
}
+
+ public static void setSharedPreferences(
+ SharedPreferences shared_preferences) {
+ ConfigHelper.shared_preferences = shared_preferences;
+ }
}