Skip to content

Commit ff8fed7

Browse files
committed
release 2.2.0
1 parent 4bdf20c commit ff8fed7

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

app/app.iml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.jakewharton/butterknife/8.5.1/jars" />
9999
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.squareup.leakcanary/leakcanary-android/1.4-beta2/jars" />
100100
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.tbruyelle.rxpermissions/rxpermissions/0.9.2/jars" />
101-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/org.lzh.nonview.updateplugin/UpdatePlugin/2.2/jars" />
101+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/org.lzh.nonview.updateplugin/UpdatePlugin/2.2.0/jars" />
102102
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
103103
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
104104
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
@@ -129,11 +129,11 @@
129129
<orderEntry type="library" exported="" name="okhttp-3.6.0" level="project" />
130130
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
131131
<orderEntry type="library" exported="" name="support-core-ui-25.1.0" level="project" />
132+
<orderEntry type="library" exported="" name="UpdatePlugin-2.2.0" level="project" />
132133
<orderEntry type="library" exported="" name="support-media-compat-25.1.0" level="project" />
133134
<orderEntry type="library" exported="" name="rxpermissions-0.9.2" level="project" />
134135
<orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
135136
<orderEntry type="library" exported="" name="support-vector-drawable-25.1.0" level="project" />
136-
<orderEntry type="library" exported="" name="UpdatePlugin-2.2" level="project" />
137137
<orderEntry type="library" exported="" name="butterknife-8.5.1" level="project" />
138138
<orderEntry type="library" exported="" name="leakcanary-watcher-1.4-beta2" level="project" />
139139
<orderEntry type="library" exported="" name="appcompat-v7-25.1.0" level="project" />

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies {
2626
testCompile 'junit:junit:4.12'
2727
// compile project(':updatepluginlib')
2828
compile 'com.android.support:appcompat-v7:25.1.0'
29-
compile 'org.lzh.nonview.updateplugin:UpdatePlugin:2.2'
29+
compile 'org.lzh.nonview.updateplugin:UpdatePlugin:2.2.0'
3030
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta2'
3131
compile 'com.jakewharton:butterknife:8.5.1'
3232
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'

updatepluginlib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ publish {
3131
userOrg = 'yjfnypeu'//bintray.com用户名
3232
groupId = 'org.lzh.nonview.updateplugin'//jcenter上的路径
3333
artifactId = 'UpdatePlugin'//项目名称
34-
publishVersion = '2.2'//版本号
34+
publishVersion = '2.2.0'//版本号
3535
desc = 'this is a auto update yourself app framework'//描述,不重要
3636
website = 'https://github.com/yjfnypeu/UpdatePlugin'//网站,不重要;尽量模拟github上的地址,例如我这样的;当然你有地址最好了
3737

updatepluginlib/src/main/java/org/lzh/framework/updatepluginlib/business/DownloadWorker.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ private void sendUpdateStart() {
6666
Utils.getMainHandler().post(new Runnable() {
6767
@Override
6868
public void run() {
69+
if (downloadCB == null) return;
6970
downloadCB.onUpdateStart();
7071
}
7172
});
@@ -77,6 +78,7 @@ protected void sendUpdateProgress(final long current, final long total) {
7778
Utils.getMainHandler().post(new Runnable() {
7879
@Override
7980
public void run() {
81+
if (downloadCB == null) return;
8082
downloadCB.onUpdateProgress(current, total);
8183
}
8284
});
@@ -88,6 +90,7 @@ private void sendUpdateComplete(final File file) {
8890
Utils.getMainHandler().post(new Runnable() {
8991
@Override
9092
public void run() {
93+
if (downloadCB == null) return;
9194
downloadCB.onUpdateComplete(file);
9295
release();
9396
}
@@ -100,6 +103,7 @@ private void sendUpdateError (final int code, final String errorMsg) {
100103
Utils.getMainHandler().post(new Runnable() {
101104
@Override
102105
public void run() {
106+
if (downloadCB == null) return;
103107
downloadCB.onUpdateError(code,errorMsg);
104108
release();
105109
}

updatepluginlib/src/main/java/org/lzh/framework/updatepluginlib/business/UpdateWorker.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ private void sendHasUpdate(final Update update) {
8282
Utils.getMainHandler().post(new Runnable() {
8383
@Override
8484
public void run() {
85+
if (checkCB == null) return;
8586
checkCB.hasUpdate(update);
8687
release();
8788
}
@@ -93,6 +94,7 @@ private void sendNoUpdate() {
9394
Utils.getMainHandler().post(new Runnable() {
9495
@Override
9596
public void run() {
97+
if (checkCB == null) return;
9698
checkCB.noUpdate();
9799
release();
98100
}
@@ -104,6 +106,7 @@ private void sendOnErrorMsg(final int code, final String errorMsg) {
104106
Utils.getMainHandler().post(new Runnable() {
105107
@Override
106108
public void run() {
109+
if (checkCB == null) return;
107110
checkCB.onCheckError(code,errorMsg);
108111
release();
109112
}

0 commit comments

Comments
 (0)