DownloadEntry修改为DownloadEntity

This commit is contained in:
黄壮华
2016-09-13 07:23:02 +08:00
parent d95d5d5e6b
commit fc68b9add5
36 changed files with 1121 additions and 1009 deletions

View File

@ -19,13 +19,13 @@ public class DownloadThread extends Thread {
private static final int CONNECT_TIME = 5000;
private static final int READ_TIME = 5000;
private DownloadEntry entry;
private DownloadEntity entry;
private DownloadListener listener;
private DownloadStatus status;
private Context context;
public DownloadThread(Context context,
DownloadEntry entry,
DownloadEntity entry,
DownloadListener listener) {
this.entry = entry;
this.listener = listener;
@ -90,7 +90,7 @@ public class DownloadThread extends Thread {
if (!TextUtils.isEmpty(eTag) && eTag.startsWith("\"") && eTag.endsWith("\"")) {
eTag = eTag.substring(1, eTag.length() - 1);
}
String eTag2 = entry.getMeta().get("ETag");
String eTag2 = entry.getETag();
if (!TextUtils.isEmpty(eTag2) && !eTag2.equals(eTag)) {
//链接被劫持,抛出异常
Utils.log("eTag = " + eTag);