diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-03-02 10:28:06 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-03-02 10:28:06 +0100 |
commit | 6fb773875736a47e465ad7cb1554874ec1cd15e1 (patch) | |
tree | 123a424a0a35eae35b6e54130034b4e5e06d9bc8 /src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java | |
parent | f58407d0b836d07fda0a95285a4c2279996bf490 (diff) |
Fixes FS#146: Remove Tor-Support
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java index 00416c94..1470d250 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java @@ -44,13 +44,11 @@ public class HttpDownloadConnection implements Transferable { private int mStatus = Transferable.STATUS_UNKNOWN; private boolean acceptedAutomatically = false; private int mProgress = 0; - private boolean mUseTor = false; private boolean canceled = false; public HttpDownloadConnection(HttpConnectionManager manager) { this.mHttpConnectionManager = manager; this.mXmppConnectionService = manager.getXmppConnectionService(); - this.mUseTor = mXmppConnectionService.useTorToConnect(); } @Override @@ -200,12 +198,7 @@ public class HttpDownloadConnection implements Transferable { try { Logging.d(Config.LOGTAG, "retrieve file size. interactive:" + String.valueOf(interactive)); changeStatus(STATUS_CHECKING); - HttpURLConnection connection; - if (mUseTor) { - connection = (HttpURLConnection) mUrl.openConnection(mHttpConnectionManager.getProxy()); - } else { - connection = (HttpURLConnection) mUrl.openConnection(); - } + HttpURLConnection connection = (HttpURLConnection) mUrl.openConnection(); connection.setRequestMethod("HEAD"); Logging.d(Config.LOGTAG, "url: "+connection.getURL().toString()); Logging.d(Config.LOGTAG, "connection: "+connection.toString()); @@ -260,12 +253,7 @@ public class HttpDownloadConnection implements Transferable { PowerManager.WakeLock wakeLock = mHttpConnectionManager.createWakeLock("http_download_"+message.getUuid()); try { wakeLock.acquire(); - HttpURLConnection connection; - if (mUseTor) { - connection = (HttpURLConnection) mUrl.openConnection(mHttpConnectionManager.getProxy()); - } else { - connection = (HttpURLConnection) mUrl.openConnection(); - } + HttpURLConnection connection = (HttpURLConnection) mUrl.openConnection(); if (connection instanceof HttpsURLConnection) { mHttpConnectionManager.setupTrustManager((HttpsURLConnection) connection, interactive); } |