Allow R8 to delete fetchCanary

This commit is contained in:
vvb2060 2023-03-01 02:32:04 +08:00 committed by John Wu
parent 5eb774a2ad
commit d06e9a0b51
3 changed files with 3 additions and 8 deletions

View File

@ -81,7 +81,7 @@ public class DownloadActivity extends Activity {
ProviderInstaller.install(this);
if (Networking.checkNetworkStatus(this)) {
if (apkLink == null) {
if (BuildConfig.APK_URL == null) {
fetchCanary();
} else {
showDialog();

View File

@ -9,7 +9,7 @@ import java.io.InputStream;
class BadRequest extends Request {
private IOException ex;
private final IOException ex;
BadRequest(IOException e) { super(null); ex = e; }

View File

@ -22,7 +22,7 @@ import java.net.HttpURLConnection;
import java.util.Scanner;
import java.util.concurrent.Executor;
public class Request implements Closeable {
public class Request {
private final HttpURLConnection conn;
private Executor executor = null;
private int code = -1;
@ -57,11 +57,6 @@ public class Request implements Closeable {
conn = c;
}
@Override
public void close() {
conn.disconnect();
}
public Request addHeaders(String key, String value) {
conn.setRequestProperty(key, value);
return this;