@@ -36,6 +36,7 @@ public class UpdateAppManager {
3636 private UpdateAppBean mUpdateApp ;
3737 private String mTargetPath ;
3838 private boolean isPost ;
39+ private boolean mHideDialog ;
3940 //自定义参数
4041
4142 private UpdateAppManager (Builder builder ) {
@@ -50,6 +51,7 @@ private UpdateAppManager(Builder builder) {
5051 mTargetPath = builder .getTargetPath ();
5152 isPost = builder .isPost ();
5253 mParams = builder .getParams ();
54+ mHideDialog = builder .isHideDialog ();
5355 }
5456
5557 /**
@@ -71,6 +73,7 @@ public void showDialog() {
7173 Intent updateIntent = new Intent (mActivity , DialogActivity .class );
7274 mUpdateApp .setTargetPath (mTargetPath );
7375 mUpdateApp .setHttpManager (mHttpManager );
76+ mUpdateApp .setHideDialog (mHideDialog );
7477 updateIntent .putExtra (INTENT_KEY , mUpdateApp );
7578 if (mThemeColor != 0 ) {
7679 updateIntent .putExtra (THEME_KEY , mThemeColor );
@@ -192,6 +195,8 @@ public static class Builder {
192195
193196 //自定义参数
194197 private Map <String , String > params ;
198+ //是否隐藏对话框下载进度条
199+ private boolean mHideDialog ;
195200
196201 public Map <String , String > getParams () {
197202 return params ;
@@ -297,6 +302,14 @@ public UpdateAppManager build() {
297302 return new UpdateAppManager (this );
298303 }
299304
305+ public Builder hideDialogOnDownloading (boolean b ) {
306+ mHideDialog = b ;
307+ return this ;
308+ }
309+
310+ public boolean isHideDialog () {
311+ return mHideDialog ;
312+ }
300313 }
301314
302315}
0 commit comments