Merge "Don't enable rollback again in pre-reboot verification"

This commit is contained in:
JW Wang
2020-09-28 15:52:31 +00:00
committed by Android (Google) Code Review

View File

@@ -2081,7 +2081,14 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
mRelinquished = true;
return mPm.new VerificationParams(user, stageDir, localObserver, params,
// TODO(b/169375643): Remove this workaround once b/161121612 is fixed.
PackageInstaller.SessionParams copiedParams = params.copy();
if (params.isStaged) {
// This is called by the pre-reboot verification. Don't enable rollback here since
// it has been enabled when pre-reboot verification starts.
copiedParams.installFlags &= ~PackageManager.INSTALL_ENABLE_ROLLBACK;
}
return mPm.new VerificationParams(user, stageDir, localObserver, copiedParams,
mInstallSource, mInstallerUid, mSigningDetails, sessionId);
}