Browse Source

Fix cleartext (non-ssl) http traffic on Android 9 though an explicit opt-in.

pull/465/head
Eric Kok 6 years ago
parent
commit
3f3ca820e5
  1. 3
      app/src/main/AndroidManifest.xml
  2. 5
      app/src/main/java/org/transdroid/daemon/Deluge/DelugeAdapter.java

3
app/src/main/AndroidManifest.xml

@ -49,7 +49,8 @@ @@ -49,7 +49,8 @@
android:icon="@drawable/ic_launcher"
android:banner="@drawable/banner"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat" >
android:theme="@style/Theme.AppCompat"
android:usesCleartextTraffic="true">
<uses-library
android:name="org.apache.http.legacy"

5
app/src/main/java/org/transdroid/daemon/Deluge/DelugeAdapter.java

@ -92,7 +92,6 @@ import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_MAXUPLOAD; @@ -92,7 +92,6 @@ import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_MAXUPLOAD;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_MESSAGE;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_ADD;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_ADD_FILE;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_ADD_MAGNET;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_AUTH_LOGIN;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_FORCERECHECK;
@ -145,7 +144,7 @@ public class DelugeAdapter implements IDaemonAdapter { @@ -145,7 +144,7 @@ public class DelugeAdapter implements IDaemonAdapter {
private static final String PATH_TO_UPLOAD = "/upload";
private static final String RPC_ID = "id";
private final String RPC_METHOD_ADD_FILE = "web.add_torrents";
private static final String RPC_METHOD_ADD_FILE = "web.add_torrents";
private DaemonSettings settings;
private DefaultHttpClient httpclient;
@ -156,7 +155,7 @@ public class DelugeAdapter implements IDaemonAdapter { @@ -156,7 +155,7 @@ public class DelugeAdapter implements IDaemonAdapter {
this.settings = settings;
}
public JSONArray addTorrentByFile(String file, Log log) throws JSONException, IOException, DaemonException {
private JSONArray addTorrentByFile(String file, Log log) throws JSONException, IOException, DaemonException {
String url = buildWebUIUrl() + PATH_TO_UPLOAD;

Loading…
Cancel
Save