pull/2/head
AriaLyy 8 years ago
parent 8fe51ab286
commit b24f83bf0b
  1. 2
      .idea/misc.xml
  2. 4
      Aria/build.gradle
  3. 5
      Aria/src/main/java/com/arialyy/aria/core/command/CancelCmd.java
  4. 2
      Aria/src/main/java/com/arialyy/aria/core/command/SingleCmd.java
  5. 2
      Aria/src/main/java/com/arialyy/aria/core/command/StartCmd.java
  6. 5
      Aria/src/main/java/com/arialyy/aria/core/command/StopCmd.java
  7. 4
      Aria/src/main/java/com/arialyy/aria/core/task/Task.java
  8. 2
      README.md

@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 9
targetSdkVersion 23
versionCode 79
versionName "2.3.1"
versionCode 80
versionName "2.3.2"
}
buildTypes {
release {

@ -14,7 +14,6 @@
* limitations under the License.
*/
package com.arialyy.aria.core.command;
import com.arialyy.aria.core.DownloadEntity;
@ -40,7 +39,9 @@ class CancelCmd extends IDownloadCmd {
task = mQueue.createTask(mTarget, mEntity);
}
if (task != null) {
task.setmTargetName(mTarget.getClass().getName());
if (mTarget != null) {
task.setTargetName(mTarget.getClass().getName());
}
mQueue.cancelTask(task);
}
}

@ -42,7 +42,7 @@ class SingleCmd extends IDownloadCmd {
} else {
Log.w(TAG, "添加命令执行失败,【该任务已经存在】");
}
task.setmTargetName(mTarget.getClass().getName());
task.setTargetName(mTarget.getClass().getName());
mQueue.startTask(task);
}
}

@ -39,7 +39,7 @@ class StartCmd extends IDownloadCmd {
task = mQueue.createTask(mTarget, mEntity);
}
if (task != null) {
task.setmTargetName(mTarget.getClass().getName());
task.setTargetName(mTarget.getClass().getName());
mQueue.startTask(task);
}
}

@ -14,7 +14,6 @@
* limitations under the License.
*/
package com.arialyy.aria.core.command;
import android.util.Log;
@ -48,7 +47,9 @@ class StopCmd extends IDownloadCmd {
Log.w(TAG, "停止命令执行失败,【调度器中没有该任务】");
}
} else {
task.setmTargetName(mTarget.getClass().getName());
if (mTarget != null) {
task.setTargetName(mTarget.getClass().getName());
}
mQueue.stopTask(task);
}
}

@ -76,7 +76,7 @@ public class Task {
return mTargetName;
}
public void setmTargetName(String targetName) {
public void setTargetName(String targetName) {
this.mTargetName = targetName;
}
@ -206,7 +206,7 @@ public class Task {
public Task build() {
Task task = new Task(context, downloadEntity);
task.mOutHandler = outHandler;
task.setmTargetName(targetName);
task.setTargetName(targetName);
downloadEntity.save();
return task;
}

@ -15,7 +15,7 @@ Aria,致力于让下载傻瓜化</br>
## 下载
[![Download](https://api.bintray.com/packages/arialyy/maven/Aria/images/download.svg)](https://bintray.com/arialyy/maven/Aria/_latestVersion)</br>
```java
compile 'com.arialyy.aria:Aria:2.3.1'
compile 'com.arialyy.aria:Aria:2.3.2'
```

Loading…
Cancel
Save