Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
caikaidev committed Aug 15, 2017
1 parent c8b798e commit 4849cc4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.kcode.appupdate"
minSdkVersion 14
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/update.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"versionCode":2,
"versionName":"2.0.0",
"content":"1.新增抢单功能#2.性能优化",
"minSupport":2,
"minSupport":1,
"url":"http://45.78.52.169/app/app.apk"
}
2 changes: 1 addition & 1 deletion lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
buildToolsVersion "25.0.2"

defaultConfig {
minSdkVersion 14
Expand Down
7 changes: 5 additions & 2 deletions lib/src/main/java/com/kcode/lib/dialog/DownLoadDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,11 @@ private void doCancel() {
private void doBackground() {
mDownLoadService.setBackground(true);
mDownLoadService.showNotification(currentProgress);
getActivity().finish();
ToastUtils.show(getActivity(),R.string.update_lib_download_in_background);
if (getActivity() != null) {
ToastUtils.show(getActivity(),R.string.update_lib_download_in_background);
getActivity().finish();
}

}

private final static int LOADING = 1000;
Expand Down

0 comments on commit 4849cc4

Please sign in to comment.