File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed
app/src/main/java/com/vector/appupdatedemo
java/com/vector/update_app Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ protected UpdateAppBean parseJson(String json) {
254
254
//更新内容
255
255
.setUpdate_log (jsonObject .getString ("update_log" ))
256
256
//是否强制更新
257
- .setConstraint (jsonObject . getBoolean ( "constraint" ) );
257
+ .setConstraint (true );
258
258
} catch (JSONException e ) {
259
259
e .printStackTrace ();
260
260
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ publish {
41
41
userOrg = ' qianwen' // bintray.com用户名
42
42
groupId = ' com.qianwen' // jcenter上的路径
43
43
artifactId = ' update-app' // 项目名称
44
- publishVersion = ' 3.2.3 ' // 版本号
44
+ publishVersion = ' 3.2.4 ' // 版本号
45
45
desc = ' App update tools'
46
46
website = ' https://github.com/WVector/AppUpdateDemo'
47
47
}
Original file line number Diff line number Diff line change 11
11
<activity
12
12
android : name =" .DialogActivity"
13
13
android : configChanges =" keyboardHidden|orientation|locale|screenSize"
14
- android : launchMode =" singleInstance"
15
14
android : screenOrientation =" portrait"
16
15
android : theme =" @style/UpdateAppDialog"
17
16
android : windowSoftInputMode =" adjustPan|stateHidden" >
Original file line number Diff line number Diff line change 1
1
package com .vector .update_app ;
2
2
3
3
import android .content .ComponentName ;
4
+ import android .content .Intent ;
4
5
import android .content .ServiceConnection ;
5
6
import android .graphics .Color ;
6
7
import android .os .Bundle ;
@@ -246,7 +247,10 @@ public void onBackPressed() {
246
247
//禁用
247
248
if (mUpdateApp != null && mUpdateApp .isConstraint ()) {
248
249
// ActManager.getInstance().finishAllActivity();
249
- android .os .Process .killProcess (android .os .Process .myPid ());
250
+ // android.os.Process.killProcess(android.os.Process.myPid());
251
+ //返回桌面
252
+ startActivity (new Intent (Intent .ACTION_MAIN ).addCategory (Intent .CATEGORY_HOME ));
253
+ return ;
250
254
}
251
255
super .onBackPressed ();
252
256
}
You can’t perform that action at this time.
0 commit comments