Staged Rollbacks Part 1: Pre reboot data copy.
For staged sessions, the staging manager calls through to the
Rollback manager during its pre-reboot flow if package rollback
is enabled for the session. It passes through a list of sessionIds
representing a single package session or siblings in a multi package
session that rollback must be enabled for. The rollback manager then
performs the following actions :
- Makes a copy of APKs and APEXes corresponding to the sessionIds
provided by the staging manager.
- Creates and persists RollbackData objects for the staged session.
and marks that they're part of a staged install and not a regular
install. This change augments RollbackData with sessionIds of
the staged session and PackageRollbackInfo with a flag indicating
whether or not it represents an APEX.
In a follow up change, the StagingManager will call through to the
RollbackManager post reboot and provide a mapping between the staged
session ID for the APK section of the staged install. This will allow
the RollbackManager to make userdata backups and finally mark the Rollback
as available.
Test: atest RollbackTest AppDataRollbackHelperTest
Test: adb install-multi-package --staged --enable-rollback \
./apex.test.apex ./RollbackTestAppAv2.apk
Change-Id: I4a7b154844684ddb26b7c95d39be36f542fb5d4b
7 files changed