Enforce multipackage installs have consistent rollback params
PackageInstallerSession: * Add multipackage consistency check to sealAndValidateLocked. The check asserts all child sessions match parent session in respect to: * Staged parameter * Rollback enabled parameter * Remove the staged conistency check from addChildSessionId * Remove sealAndValidateLocked from constructor because it was used only when sessions where loaded (from XML file) and there's no guarantee that child sessions will be loaded before parent. Instead, mark the session as ShouldBeSealed. PackageInstallerService: * To make sure relevant sessions are sealed and validated after they are loaded from an XML file, iterate through the loaded seasions and seal and validate those marked as ShouldBeSealed. Sessions that do not pass the validation are destroyed. Test: atest StagedRollbackTest Test: atest CtsAtomicInstallTestCases Test: atest PackageInstallerSessionTest Fixes: 127765168 Fixes: 124215984 Change-Id: I8f152332cadb0f6c9063264f27668821fad1cec7
Loading
Please register or sign in to comment