@@ -36,6 +36,7 @@ public class UpdateAppManager {
36
36
private UpdateAppBean mUpdateApp ;
37
37
private String mTargetPath ;
38
38
private boolean isPost ;
39
+ private boolean mHideDialog ;
39
40
//自定义参数
40
41
41
42
private UpdateAppManager (Builder builder ) {
@@ -50,6 +51,7 @@ private UpdateAppManager(Builder builder) {
50
51
mTargetPath = builder .getTargetPath ();
51
52
isPost = builder .isPost ();
52
53
mParams = builder .getParams ();
54
+ mHideDialog = builder .isHideDialog ();
53
55
}
54
56
55
57
/**
@@ -71,6 +73,7 @@ public void showDialog() {
71
73
Intent updateIntent = new Intent (mActivity , DialogActivity .class );
72
74
mUpdateApp .setTargetPath (mTargetPath );
73
75
mUpdateApp .setHttpManager (mHttpManager );
76
+ mUpdateApp .setHideDialog (mHideDialog );
74
77
updateIntent .putExtra (INTENT_KEY , mUpdateApp );
75
78
if (mThemeColor != 0 ) {
76
79
updateIntent .putExtra (THEME_KEY , mThemeColor );
@@ -192,6 +195,8 @@ public static class Builder {
192
195
193
196
//自定义参数
194
197
private Map <String , String > params ;
198
+ //是否隐藏对话框下载进度条
199
+ private boolean mHideDialog ;
195
200
196
201
public Map <String , String > getParams () {
197
202
return params ;
@@ -297,6 +302,14 @@ public UpdateAppManager build() {
297
302
return new UpdateAppManager (this );
298
303
}
299
304
305
+ public Builder hideDialogOnDownloading (boolean b ) {
306
+ mHideDialog = b ;
307
+ return this ;
308
+ }
309
+
310
+ public boolean isHideDialog () {
311
+ return mHideDialog ;
312
+ }
300
313
}
301
314
302
315
}
0 commit comments