mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 02:25:28 +00:00
Allow R8 to delete fetchCanary
This commit is contained in:
parent
5eb774a2ad
commit
d06e9a0b51
@ -81,7 +81,7 @@ public class DownloadActivity extends Activity {
|
|||||||
ProviderInstaller.install(this);
|
ProviderInstaller.install(this);
|
||||||
|
|
||||||
if (Networking.checkNetworkStatus(this)) {
|
if (Networking.checkNetworkStatus(this)) {
|
||||||
if (apkLink == null) {
|
if (BuildConfig.APK_URL == null) {
|
||||||
fetchCanary();
|
fetchCanary();
|
||||||
} else {
|
} else {
|
||||||
showDialog();
|
showDialog();
|
||||||
|
@ -9,7 +9,7 @@ import java.io.InputStream;
|
|||||||
|
|
||||||
class BadRequest extends Request {
|
class BadRequest extends Request {
|
||||||
|
|
||||||
private IOException ex;
|
private final IOException ex;
|
||||||
|
|
||||||
BadRequest(IOException e) { super(null); ex = e; }
|
BadRequest(IOException e) { super(null); ex = e; }
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ import java.net.HttpURLConnection;
|
|||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
|
|
||||||
public class Request implements Closeable {
|
public class Request {
|
||||||
private final HttpURLConnection conn;
|
private final HttpURLConnection conn;
|
||||||
private Executor executor = null;
|
private Executor executor = null;
|
||||||
private int code = -1;
|
private int code = -1;
|
||||||
@ -57,11 +57,6 @@ public class Request implements Closeable {
|
|||||||
conn = c;
|
conn = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void close() {
|
|
||||||
conn.disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Request addHeaders(String key, String value) {
|
public Request addHeaders(String key, String value) {
|
||||||
conn.setRequestProperty(key, value);
|
conn.setRequestProperty(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
Reference in New Issue
Block a user