зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1115377 - Delete outdated update package when downloading new version. r=snorp
This commit is contained in:
Родитель
a6bdbdb9b5
Коммит
a52fe731d9
|
@ -118,11 +118,6 @@ public class UpdateService extends IntentService {
|
|||
} else if (UpdateServiceHelper.ACTION_CANCEL_DOWNLOAD.equals(intent.getAction())) {
|
||||
mCancelDownload = true;
|
||||
} else {
|
||||
if (!UpdateServiceHelper.ACTION_APPLY_UPDATE.equals(intent.getAction())) {
|
||||
// Delete the update package used to install the current version.
|
||||
deleteUpdatePackage(getLastFileName());
|
||||
}
|
||||
|
||||
super.onStartCommand(intent, flags, startId);
|
||||
}
|
||||
|
||||
|
@ -465,6 +460,11 @@ public class UpdateService extends IntentService {
|
|||
}
|
||||
}
|
||||
|
||||
if (!info.buildID.equals(getLastBuildID())) {
|
||||
// Delete the previous package when a new version becomes available.
|
||||
deleteUpdatePackage(getLastFileName());
|
||||
}
|
||||
|
||||
Log.i(LOGTAG, "downloading update package");
|
||||
sendCheckUpdateResult(UpdateServiceHelper.CheckUpdateResult.DOWNLOADING);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче