调整更新推送逻辑
This commit is contained in:
@ -235,12 +235,12 @@ public class UpdateManager {
|
||||
loadingDialog.dismiss();
|
||||
}
|
||||
if (response != null) {
|
||||
if (appEntity.isForce() || isUpdateFileDownloaded(response)) {
|
||||
showUpdateDialog(response);
|
||||
if (!appEntity.isForce()
|
||||
&& !isUpdateFileDownloaded(response)
|
||||
&& NetworkUtils.isWifiConnected(mContext)) {
|
||||
createUpdate(response, true);
|
||||
} else {
|
||||
if (NetworkUtils.isWifiConnected(mContext)) {
|
||||
createUpdate(response, true);
|
||||
}
|
||||
showUpdateDialog(response);
|
||||
}
|
||||
if (handler != null) {
|
||||
Message message = new Message();
|
||||
@ -414,7 +414,7 @@ public class UpdateManager {
|
||||
}
|
||||
|
||||
downloadEntity.setPackageName(mContext.getPackageName());
|
||||
DownloadManager.getInstance(mContext).cancel(downloadEntity.getUrl(), false, true);
|
||||
DownloadManager.getInstance(mContext).cancel(downloadEntity.getUrl(), true, true);
|
||||
DownloadManager.getInstance(mContext).pauseAll();
|
||||
|
||||
AppExecutor.getUiExecutor().executeWithDelay(() -> {
|
||||
|
||||
Reference in New Issue
Block a user