mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-20 17:48:43 +00:00
Don't use DownloadManager for Magisk
This commit is contained in:
@@ -69,4 +69,17 @@ public class WebService {
|
||||
|
||||
return conn;
|
||||
}
|
||||
|
||||
public static HttpURLConnection mustRequest(String address, Map<String, String> header) throws IOException {
|
||||
HttpURLConnection conn;
|
||||
do {
|
||||
conn = WebService.request(address, header);
|
||||
int total = conn.getContentLength();
|
||||
if (total < 0)
|
||||
conn.disconnect();
|
||||
else
|
||||
break;
|
||||
} while (true);
|
||||
return conn;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user