summaryrefslogtreecommitdiff
path: root/src/se/leap/bitmaskclient/LeapHttpClient.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-01-14 19:44:10 +0100
committerParménides GV <parmegv@sdf.org>2014-01-14 19:54:58 +0100
commit1fe78d00244f52f903435c970c0ebf0071a08f36 (patch)
tree5e4f600dba76a39ab5fa23e13f638e6ce58b29fa /src/se/leap/bitmaskclient/LeapHttpClient.java
parentdbf1265f736c00aa31289e75818b1ec56311d31c (diff)
No sharedprefs methods in ConfigHelper.
This means we obtain the SharedPreferences object each time we want to use it. This yields to longer code lines while reading and writing to them.
Diffstat (limited to 'src/se/leap/bitmaskclient/LeapHttpClient.java')
-rw-r--r--src/se/leap/bitmaskclient/LeapHttpClient.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/se/leap/bitmaskclient/LeapHttpClient.java b/src/se/leap/bitmaskclient/LeapHttpClient.java
index 837da236..885b5105 100644
--- a/src/se/leap/bitmaskclient/LeapHttpClient.java
+++ b/src/se/leap/bitmaskclient/LeapHttpClient.java
@@ -34,7 +34,6 @@ import android.content.Context;
*
*/
public class LeapHttpClient extends DefaultHttpClient {
- final Context context;
private static LeapHttpClient client;
@@ -43,10 +42,8 @@ public class LeapHttpClient extends DefaultHttpClient {
* @param context
* @return the new client.
*/
- public static LeapHttpClient getInstance(Context context) {
+ public static LeapHttpClient getInstance(String cert_string) {
if(client == null) {
- client = new LeapHttpClient(context);
- String cert_string = ConfigHelper.getStringFromSharedPref(Provider.CA_CERT);
if(cert_string != null) {
ConfigHelper.addTrustedCertificate("provider_ca_certificate", cert_string);
}
@@ -77,8 +74,4 @@ public class LeapHttpClient extends DefaultHttpClient {
throw new AssertionError(e);
}
}
-
- public LeapHttpClient(Context context) {
- this.context = context;
- }
}