summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Leonard <meanderingcode@aetherislands.net>2013-06-08 23:12:49 -0600
committerSean Leonard <meanderingcode@aetherislands.net>2013-06-09 02:10:19 -0600
commit57ac2c271561fe9f1255109733f5daae06e9234c (patch)
treee57e9c615e2f39b71a2c58e935516aa2f8e845e6
parent1559bc45048fb877d45247f1aa9b51ee3632a3b8 (diff)
More changes to calls for SharedPreferences via ConfigHelper methods
-rw-r--r--src/se/leap/leapclient/LeapHttpClient.java16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/se/leap/leapclient/LeapHttpClient.java b/src/se/leap/leapclient/LeapHttpClient.java
index a2ee8ad6..646f80f5 100644
--- a/src/se/leap/leapclient/LeapHttpClient.java
+++ b/src/se/leap/leapclient/LeapHttpClient.java
@@ -9,9 +9,6 @@ import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.SingleClientConnManager;
-import org.json.JSONException;
-import org.json.JSONObject;
-
import android.content.Context;
public class LeapHttpClient extends DefaultHttpClient {
@@ -22,16 +19,9 @@ public class LeapHttpClient extends DefaultHttpClient {
public static LeapHttpClient getInstance(Context context) {
if(client == null) {
client = new LeapHttpClient(context);
- String cert_json_string = ConfigHelper.getStringFromSharedPref(ConfigHelper.MAIN_CERT_KEY);
- String cert_string;
- try {
- cert_string = new JSONObject(cert_json_string).getString(ConfigHelper.MAIN_CERT_KEY);
- if(!cert_string.isEmpty()) {
- ConfigHelper.addTrustedCertificate("recovered_certificate", cert_string);
- }
- } catch (JSONException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ String cert_string = ConfigHelper.getStringFromSharedPref(ConfigHelper.MAIN_CERT_KEY);
+ if(!cert_string.isEmpty()) {
+ ConfigHelper.addTrustedCertificate("recovered_certificate", cert_string);
}
}
return client;