修复暂停问题

pull/330/head
AriaLyy 7 years ago
parent 2d64c50ed0
commit 0a6e12fe6c
  1. 4
      Aria/build.gradle
  2. 6
      Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java
  3. 1
      Aria/src/main/java/com/arialyy/aria/core/download/DownloadTarget.java
  4. 1
      Aria/src/main/java/com/arialyy/aria/core/scheduler/AbsSchedulers.java

@ -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'

@ -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 + "");
mConstance.CURRENT_LOCATION += r - startL;
if (r > startL) {
mConstance.CURRENT_LOCATION += r - startL;
startL = r;
}
Log.d(TAG, "任务【" + mEntity.getFileName() + "】线程__" + i + "__恢复下载");
startL = r;
recordL[rl] = i;
rl++;
} else {

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

@ -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)

Loading…
Cancel
Save