This commit is contained in:
@ -137,22 +137,25 @@ public class UpdateManager {
|
||||
} else if (DownloadStatus.hijack.equals(downloadEntity.getStatus())) {
|
||||
Utils.toast(mContext, "网络劫持,请稍后重试");
|
||||
}
|
||||
} else if (updateDialog != null && updateDialog.isShowing()) {
|
||||
} else {
|
||||
if (downloadEntity.getSize() != lastUpdateFileSize) {
|
||||
lastUpdateFileSize = downloadEntity.getSize();
|
||||
SPUtils.setLong(Constants.LAST_GHZS_UPDATE_FILE_SIZE, lastUpdateFileSize);
|
||||
}
|
||||
|
||||
if (DownloadStatus.done.equals(downloadEntity.getStatus())) {
|
||||
updateUpdateDialogView(true);
|
||||
}
|
||||
} else {
|
||||
if (mContext instanceof MainActivity
|
||||
&& AppManager.getInstance().getRecentActiveActivity() == mContext) {
|
||||
if (updateDialog != null && updateDialog.isShowing()) {
|
||||
if (DownloadStatus.done.equals(downloadEntity.getStatus())) {
|
||||
showUpdateDialog(currentUpdateMd5);
|
||||
updateUpdateDialogView(true);
|
||||
}
|
||||
} else {
|
||||
if (mContext instanceof MainActivity
|
||||
&& AppManager.getInstance().getRecentActiveActivity() == mContext) {
|
||||
if (DownloadStatus.done.equals(downloadEntity.getStatus())) {
|
||||
showUpdateDialog(currentUpdateMd5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -235,7 +238,9 @@ public class UpdateManager {
|
||||
if (appEntity.isForce() || isUpdateFileDownloaded(response)) {
|
||||
showUpdateDialog(response);
|
||||
} else {
|
||||
createUpdate(response, true);
|
||||
if (NetworkUtils.isWifiConnected(mContext)) {
|
||||
createUpdate(response, true);
|
||||
}
|
||||
}
|
||||
if (handler != null) {
|
||||
Message message = new Message();
|
||||
|
||||
Reference in New Issue
Block a user