修复暂停问题

This commit is contained in:
AriaLyy
2017-10-10 22:02:52 +08:00
parent 2d64c50ed0
commit 0a6e12fe6c
4 changed files with 7 additions and 5 deletions

View File

@@ -23,8 +23,8 @@ dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile project(':AriaAnnotations')
compile 'com.arialyy.aria:aria-ftp-plug:1.0.1'
// compile project(':AriaFtpPlug')
// compile 'com.arialyy.aria:aria-ftp-plug:1.0.1'
compile project(':AriaFtpPlug')
}
apply from: 'bintray-release.gradle'

View File

@@ -325,9 +325,11 @@ public abstract class AbsFileer<ENTITY extends AbsNormalEntity, TASK_ENTITY exte
//如果有记录,则恢复下载
if (!isNewTask && record != null && Long.parseLong(record + "") >= 0) {
Long r = Long.parseLong(record + "");
if (r > startL) {
mConstance.CURRENT_LOCATION += r - startL;
Log.d(TAG, "任务【" + mEntity.getFileName() + "】线程__" + i + "__恢复下载");
startL = r;
}
Log.d(TAG, "任务【" + mEntity.getFileName() + "】线程__" + i + "__恢复下载");
recordL[rl] = i;
rl++;
} else {

View File

@@ -74,7 +74,6 @@ public class DownloadTarget
entity.save();
mTaskEntity.save();
}
mEntity = mTaskEntity.entity;
}

View File

@@ -154,6 +154,7 @@ abstract class AbsSchedulers<TASK_ENTITY extends AbsTaskEntity, ENTITY extends A
if (task.getEntity().getState() == IEntity.STATE_WAIT) {
break;
}
startNextTask();
case CANCEL:
mQueue.removeTask(entity);
if (mQueue.getCurrentExePoolNum() < AriaManager.getInstance(AriaManager.APP)