diff --git a/README.md b/README.md
index 0068e16..1877009 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版
com.king.app
app-updater
- 1.0.4
+ 1.0.5
pom
@@ -48,7 +48,7 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版
com.king.app
app-dialog
- 1.0.4
+ 1.0.5
pom
```
@@ -57,25 +57,25 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版
//----------AndroidX 版本
//app-updater
- implementation 'com.king.app:app-updater:1.0.4-androidx'
+ implementation 'com.king.app:app-updater:1.0.5-androidx'
//app-dialog
- implementation 'com.king.app:app-dialog:1.0.4-androidx'
+ implementation 'com.king.app:app-dialog:1.0.5-androidx'
//----------Android 版本
//app-updater
- implementation 'com.king.app:app-updater:1.0.4'
+ implementation 'com.king.app:app-updater:1.0.5'
//app-dialog
- implementation 'com.king.app:app-dialog:1.0.4'
+ implementation 'com.king.app:app-dialog:1.0.5'
```
### Lvy:
```lvy
//app-updater
-
+
//app-dialog
-
+
```
@@ -140,6 +140,9 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版
## 版本记录
+#### v1.0.5:2019-9-4
+* 支持取消下载
+
#### v1.0.4:2019-6-4 [支持AndroidX版本](https://github.com/jenly1314/AppUpdater/tree/androidx)
* 支持添加请求头
@@ -174,6 +177,8 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版
CSDN: jenly121
+ 博客园: jenly
+
Github: jenly1314
加入QQ群: 20867961
diff --git a/app-dialog/src/main/java/com/king/app/dialog/AppDialog.java b/app-dialog/src/main/java/com/king/app/dialog/AppDialog.java
index 5be3487..b2f0e23 100644
--- a/app-dialog/src/main/java/com/king/app/dialog/AppDialog.java
+++ b/app-dialog/src/main/java/com/king/app/dialog/AppDialog.java
@@ -86,6 +86,7 @@ public enum AppDialog {
public void dismissDialogFragment(FragmentManager fragmentManager){
dismissDialogFragment(fragmentManager,mTag);
+ mTag = null;
}
public void dismissDialogFragment(FragmentManager fragmentManager,String tag){
diff --git a/app-updater/src/main/java/com/king/app/updater/AppUpdater.java b/app-updater/src/main/java/com/king/app/updater/AppUpdater.java
index 38ee0a0..ab4a5e4 100644
--- a/app-updater/src/main/java/com/king/app/updater/AppUpdater.java
+++ b/app-updater/src/main/java/com/king/app/updater/AppUpdater.java
@@ -112,7 +112,7 @@ public class AppUpdater {
}
/**
- * 停止
+ * 取消下载
*/
public void stop(){
stopDownloadService();
diff --git a/app-updater/src/main/java/com/king/app/updater/http/HttpManager.java b/app-updater/src/main/java/com/king/app/updater/http/HttpManager.java
index cf89805..7251c87 100644
--- a/app-updater/src/main/java/com/king/app/updater/http/HttpManager.java
+++ b/app-updater/src/main/java/com/king/app/updater/http/HttpManager.java
@@ -141,10 +141,6 @@ public class HttpManager implements IHttpManager {
connect.disconnect();
- if(isCancelled()){
- return null;
- }
-
return file;
}else {//连接失败
throw new ConnectException(String.format("responseCode = %d",responseCode));
diff --git a/app-updater/src/main/java/com/king/app/updater/service/DownloadService.java b/app-updater/src/main/java/com/king/app/updater/service/DownloadService.java
index 02e7f7e..1535c46 100644
--- a/app-updater/src/main/java/com/king/app/updater/service/DownloadService.java
+++ b/app-updater/src/main/java/com/king/app/updater/service/DownloadService.java
@@ -350,6 +350,7 @@ public class DownloadService extends Service {
@Override
public void onDestroy() {
isDownloading = false;
+ mHttpManager = null;
super.onDestroy();
}
diff --git a/app-updater/src/main/java/com/king/app/updater/util/AppUtils.java b/app-updater/src/main/java/com/king/app/updater/util/AppUtils.java
index bff377b..5411ccf 100644
--- a/app-updater/src/main/java/com/king/app/updater/util/AppUtils.java
+++ b/app-updater/src/main/java/com/king/app/updater/util/AppUtils.java
@@ -102,7 +102,7 @@ public enum AppUtils {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addCategory(Intent.CATEGORY_DEFAULT);
- Uri uriData = null;
+ Uri uriData;
String type = "application/vnd.android.package-archive";
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
diff --git a/app/release/app-release.apk b/app/release/app-release.apk
index ce321b3..f22eb05 100644
Binary files a/app/release/app-release.apk and b/app/release/app-release.apk differ
diff --git a/app/release/output.json b/app/release/output.json
index bf5ffe2..670a4ef 100644
--- a/app/release/output.json
+++ b/app/release/output.json
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":5,"versionName":"1.0.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":7,"versionName":"1.0.5","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
diff --git a/versions.gradle b/versions.gradle
index f3bf6aa..956f90c 100644
--- a/versions.gradle
+++ b/versions.gradle
@@ -1,7 +1,7 @@
//App
def app_version = [:]
-app_version.versionCode = 5 //androidx 6
-app_version.versionName = "1.0.4"
+app_version.versionCode = 7 //androidx 8
+app_version.versionName = "1.0.5"
ext.app_version = app_version
//build version