修改暂停的下载也算下载
This commit is contained in:
@ -134,17 +134,19 @@ public class DownloadThread extends Thread {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (status != DownloadStatus.pause
|
||||
&& status != DownloadStatus.cancel) {
|
||||
listener.onStatusChanged(DownloadStatus.done);
|
||||
}
|
||||
bos.flush();
|
||||
Utils.log(DownloadThread.class.getSimpleName(),
|
||||
"flush==>" + targetFile.length() + ",progress==>"
|
||||
+ entry.getProgress());
|
||||
|
||||
+ entry.getProgress() + ",size==>" + entry.getSize());
|
||||
|
||||
bis.close();
|
||||
bos.close();
|
||||
// if (status != DownloadStatus.pause && status != DownloadStatus.cancel) {
|
||||
// listener.onStatusChanged(DownloadStatus.done);
|
||||
// }
|
||||
if (targetFile.length() == entry.getSize()) {
|
||||
listener.onStatusChanged(DownloadStatus.done);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String errorMsg = Log.getStackTraceString(e);
|
||||
|
||||
Reference in New Issue
Block a user