fixed conflict

This commit is contained in:
lixiaopeng
2022-09-23 17:28:40 +08:00
parent f856d0fc23
commit 7c36193fcd
5 changed files with 12 additions and 2 deletions

View File

@@ -147,6 +147,7 @@ public class DownloadService implements InitThread.InitCallBack, DownloadCallBac
@Override
public void progressCallBack(String url, int length) {
IDownload iDownload = callBacks.get(url);
Log.d(DOWN_LOAD_TAG, "iDownload progressCallBack = " + iDownload);
if (iDownload != null) {
iDownload.onProgress(url, length);
}
@@ -155,7 +156,7 @@ public class DownloadService implements InitThread.InitCallBack, DownloadCallBac
@Override
public void threadDownLoadFinished(String url, ThreadBean threadBean) {
IDownload iDownload = callBacks.get(url);
Log.d(DOWN_LOAD_TAG, "iDownload = " + iDownload);
Log.d(DOWN_LOAD_TAG, "iDownload threadDownLoadFinished = " + iDownload);
if (iDownload != null) {
iDownload.onFinished(url, threadBean);
}

View File

@@ -1,6 +1,10 @@
package com.mogo.eagle.core.utilcode.breakpoint.thread;
import static com.mogo.eagle.core.utilcode.breakpoint.Config.DOWN_LOAD_TAG;
import android.util.Log;
import com.mogo.eagle.core.utilcode.breakpoint.Config;
import com.mogo.eagle.core.utilcode.breakpoint.bean.FileBean;
import com.mogo.eagle.core.utilcode.breakpoint.bean.ThreadBean;
@@ -51,6 +55,7 @@ public class DownloadThread extends Thread {
raf = new RandomAccessFile(file,"rwd");
raf.seek(start);
//开始下载
Log.d(DOWN_LOAD_TAG, "DownloadThread connection.getResponseCode() = " + connection.getResponseCode() + "---threadBean.getUrl() =" + threadBean.getUrl());
if(connection.getResponseCode() == HttpURLConnection.HTTP_PARTIAL){
inputStream = connection.getInputStream();
byte[] bytes = new byte[1024];