diff --git a/.idea/misc.xml b/.idea/misc.xml index 5d199810..fbb68289 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/Aria/build.gradle b/Aria/build.gradle index a4c51283..3fb2343a 100644 --- a/Aria/build.gradle +++ b/Aria/build.gradle @@ -7,8 +7,8 @@ android { defaultConfig { minSdkVersion 9 targetSdkVersion 23 - versionCode 79 - versionName "2.3.1" + versionCode 80 + versionName "2.3.2" } buildTypes { release { diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/CancelCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/CancelCmd.java index bac903de..9e80372d 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/CancelCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/CancelCmd.java @@ -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); } } diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/SingleCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/SingleCmd.java index fda9cff9..a45f0b2f 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/SingleCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/SingleCmd.java @@ -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); } } diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/StartCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/StartCmd.java index 66f06118..d30c0b77 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/StartCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/StartCmd.java @@ -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); } } diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/StopCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/StopCmd.java index 9002b90b..611f6e12 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/StopCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/StopCmd.java @@ -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); } } diff --git a/Aria/src/main/java/com/arialyy/aria/core/task/Task.java b/Aria/src/main/java/com/arialyy/aria/core/task/Task.java index 8aa4d918..8b29994e 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/task/Task.java +++ b/Aria/src/main/java/com/arialyy/aria/core/task/Task.java @@ -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; } diff --git a/README.md b/README.md index 3e9001d0..710f0784 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Aria,致力于让下载傻瓜化
## 下载 [![Download](https://api.bintray.com/packages/arialyy/maven/Aria/images/download.svg)](https://bintray.com/arialyy/maven/Aria/_latestVersion)
```java -compile 'com.arialyy.aria:Aria:2.3.1' +compile 'com.arialyy.aria:Aria:2.3.2' ```