aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/http/HttpConnection.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-10-20 21:08:33 +0200
committeriNPUTmice <daniel@gultsch.de>2014-10-20 21:08:33 +0200
commit21961673cbcb3132d2405c3d276058b94cbdbbfc (patch)
treea4cb9ef7f8c6395c2e7fc406f2c5a5e73ef1edcb /src/eu/siacs/conversations/http/HttpConnection.java
parent0bb2c3c4d5b2a4b676610276fafd50ea55f43706 (diff)
refactored avatar generation. first step
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/http/HttpConnection.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/http/HttpConnection.java b/src/eu/siacs/conversations/http/HttpConnection.java
index 3eb8bb84..cbcdfb5c 100644
--- a/src/eu/siacs/conversations/http/HttpConnection.java
+++ b/src/eu/siacs/conversations/http/HttpConnection.java
@@ -91,17 +91,20 @@ public class HttpConnection implements Downloadable {
this.mStatus = status;
mXmppConnectionService.updateConversationUi();
}
-
- private void setupTrustManager(HttpsURLConnection connection, boolean interactive) {
+
+ private void setupTrustManager(HttpsURLConnection connection,
+ boolean interactive) {
X509TrustManager trustManager;
if (interactive) {
trustManager = mXmppConnectionService.getMemorizingTrustManager();
} else {
- trustManager = mXmppConnectionService.getMemorizingTrustManager().getNonInteractive();
+ trustManager = mXmppConnectionService.getMemorizingTrustManager()
+ .getNonInteractive();
}
try {
SSLContext sc = SSLContext.getInstance("TLS");
- sc.init(null,new X509TrustManager[] { trustManager },mXmppConnectionService.getRNG());
+ sc.init(null, new X509TrustManager[] { trustManager },
+ mXmppConnectionService.getRNG());
connection.setSSLSocketFactory(sc.getSocketFactory());
} catch (KeyManagementException e) {
return;
@@ -111,7 +114,7 @@ public class HttpConnection implements Downloadable {
}
private class FileSizeChecker implements Runnable {
-
+
private boolean interactive = false;
public FileSizeChecker(boolean interactive) {
@@ -139,7 +142,8 @@ public class HttpConnection implements Downloadable {
}
}
- private long retrieveFileSize() throws IOException, SSLHandshakeException {
+ private long retrieveFileSize() throws IOException,
+ SSLHandshakeException {
HttpURLConnection connection = (HttpURLConnection) mUrl
.openConnection();
connection.setRequestMethod("HEAD");