diff options
author | Parménides GV <parmegv@sdf.org> | 2013-06-10 18:19:29 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-06-10 18:19:29 +0200 |
commit | f6899be0bfbe834364dcc234aa05ed59176af108 (patch) | |
tree | 039d56c592020c1bea14cdfa39e4ff3dcbab36d2 /src/se/leap/leapclient/LeapHttpClient.java | |
parent | d74a3ae14a27893572d170c138e18522b541866a (diff) | |
parent | 5d14f128f8da5384e6834008326e435524c8fe33 (diff) |
Merge branch 'MeanderingCode-feature/authGui' into feature/authGui
This is the pull request #3 from GitHub.
Diffstat (limited to 'src/se/leap/leapclient/LeapHttpClient.java')
-rw-r--r-- | src/se/leap/leapclient/LeapHttpClient.java | 16 |
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..3eeebe95 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 != null) { + ConfigHelper.addTrustedCertificate("recovered_certificate", cert_string); } } return client; |