修复暂停问题
This commit is contained in:
@@ -23,8 +23,8 @@ dependencies {
|
|||||||
testCompile 'junit:junit:4.12'
|
testCompile 'junit:junit:4.12'
|
||||||
compile 'com.android.support:appcompat-v7:23.1.1'
|
compile 'com.android.support:appcompat-v7:23.1.1'
|
||||||
compile project(':AriaAnnotations')
|
compile project(':AriaAnnotations')
|
||||||
compile 'com.arialyy.aria:aria-ftp-plug:1.0.1'
|
// compile 'com.arialyy.aria:aria-ftp-plug:1.0.1'
|
||||||
// compile project(':AriaFtpPlug')
|
compile project(':AriaFtpPlug')
|
||||||
|
|
||||||
}
|
}
|
||||||
apply from: 'bintray-release.gradle'
|
apply from: 'bintray-release.gradle'
|
||||||
|
@@ -325,9 +325,11 @@ public abstract class AbsFileer<ENTITY extends AbsNormalEntity, TASK_ENTITY exte
|
|||||||
//如果有记录,则恢复下载
|
//如果有记录,则恢复下载
|
||||||
if (!isNewTask && record != null && Long.parseLong(record + "") >= 0) {
|
if (!isNewTask && record != null && Long.parseLong(record + "") >= 0) {
|
||||||
Long r = Long.parseLong(record + "");
|
Long r = Long.parseLong(record + "");
|
||||||
|
if (r > startL) {
|
||||||
mConstance.CURRENT_LOCATION += r - startL;
|
mConstance.CURRENT_LOCATION += r - startL;
|
||||||
Log.d(TAG, "任务【" + mEntity.getFileName() + "】线程__" + i + "__恢复下载");
|
|
||||||
startL = r;
|
startL = r;
|
||||||
|
}
|
||||||
|
Log.d(TAG, "任务【" + mEntity.getFileName() + "】线程__" + i + "__恢复下载");
|
||||||
recordL[rl] = i;
|
recordL[rl] = i;
|
||||||
rl++;
|
rl++;
|
||||||
} else {
|
} else {
|
||||||
|
@@ -74,7 +74,6 @@ public class DownloadTarget
|
|||||||
entity.save();
|
entity.save();
|
||||||
mTaskEntity.save();
|
mTaskEntity.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
mEntity = mTaskEntity.entity;
|
mEntity = mTaskEntity.entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -154,6 +154,7 @@ abstract class AbsSchedulers<TASK_ENTITY extends AbsTaskEntity, ENTITY extends A
|
|||||||
if (task.getEntity().getState() == IEntity.STATE_WAIT) {
|
if (task.getEntity().getState() == IEntity.STATE_WAIT) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
startNextTask();
|
||||||
case CANCEL:
|
case CANCEL:
|
||||||
mQueue.removeTask(entity);
|
mQueue.removeTask(entity);
|
||||||
if (mQueue.getCurrentExePoolNum() < AriaManager.getInstance(AriaManager.APP)
|
if (mQueue.getCurrentExePoolNum() < AriaManager.getInstance(AriaManager.APP)
|
||||||
|
Reference in New Issue
Block a user