Rather than implicitly reusing the PackageInstaller status codes.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I86929c0c1a5153c7f58e255e104b30fe96ddeca8
By passing a new causePackages list of VersionedPackage to
commitRollback and adding a RollbackInfo.getCausePackages() method to
retrieve the cause packages for committed rollbacks.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I3b52511fd7e31b6304e7a7c34180dbb4d20f6dbf
To make it clear that the system only pays attention to the provided
rollback ID when committing a rollback.
Also, rename executeRollback to commitRollback in IRollbackManager.aidl,
now that we are touching the code anyway.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I315e75c39019536fb2f090a0c84ed4cf7c03ce8c
Which makes more sense for rollback of staged installs, where the caller
will have to reboot the device before the rollback takes effect.
Internal references to "execute" in IRollbackManager.aidl and the
rollback manager service implementation will be renamed in a follow up
CL.
Bug: 112431924
Test: atest RollbackTest
Change-Id: Ic2bb479873b309fc145e4eda3b347849ac219ac9
Because there's no need to distinguish between package and other kinds
of rollbacks, and for rollback of staged installs, committed is a more
appropriate name than executed.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I2a409de29ba82a7a3df2fd0b17f939795caa61d5
Instead of getAvailableRollback and getPackagesWithAvailableRollbacks,
which are soon to be removed.
Bug: 112431924
Test: atest RollbackTest
Change-Id: Ia69342a41bebb91a9fa8044ef8d8b495aba7187f
Instead of a single target package. Needed for rollback of multiPackage
installs.
Additionally, expose this information by a public method rather than a
public field.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I6e3ce87385abd37c48047db27bc443d3719ee023
With the help of PackageWatchdog, RollbackPackageHealthObserver will
monitor packages after enabling rollbacks and will execute the rollback
automatically if it detects frequent crashes.
Test: atest RollbackTest
Bug: 112431924
Change-Id: Ic85464583f7c6b0778d853a87670d250a42c33de
The receiver of the broadcast would likely want to query the rolled back
packages via RollbackManager regardless, and it's not clear which
package to put when an atomic set of packages is rolled back.
Bug: 112431924
Test: atest RollbackTest
Change-Id: Ic8db00b62d8993e00a0dd2cb79ae68c430b45bb8
Rather than defining a new custom PackageRollbackInfo.PackageVersion
type.
Also clean up PackageRollbackInfo API by replacing public fields with
methods and picking better names.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I68a91e07b8745df9c5ecb22fdccbfcd76385814a
The only significant missing piece of functionality is the
handling of credential encrypted data in the case where one
or more users haven't unlocked their device. This will be handled
in a follow-up change.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I4582018337ce0344379f6f73d6fd6c9ce31c58a0
Tests that we properly persist data about multiple available rollbacks
and available multi-package rollbacks.
Test: atest RollbackTest
Bug: 112431924
Change-Id: Ib31a0388e6420a942fac00f27fef33c0a866ea0b
The RollbackManager APIs still need to be updated to expose information
about dependant rollbacks.
Test: atest RollbackTest, with multiPackage test now enabled.
Bug: 112431924
Change-Id: Ib05902aa2bc8b8e228ad6faf3d9418190c5bc946
In preparation for supporting rollback of multi-package installs, where
we need to use the SessionInfo to determine what the multi-package
install sets are.
Expire rollbacks relative to when they were committed, not when they
were first enabled.
Test: atest RollbackTest
Bug: 112431924
Change-Id: Ia8795813157ede3c1c5c5429d7b711db88c3e91a
The test is marked @Ignore for now because we don't yet properly support
rollback of multi-package installs.
Test: atest RollbackTest (with selinux disabled).
Test: atest RollbackTest fails without the @Ignore.
Bug: 112431924
Change-Id: Ia76d48756bc1078344dcf1f2c5696ab79eb0c40c
RollbackManagerService incorrectly ignores the package name passed to
getAvailableRollback and executeRollback.
This CL fixes the bug and adds a regression test. The infrastructure for
having multiple test apps in RollbackTest will also be useful for
testing rollback of multi-package installs.
Test: atest RollbackTest (with selinux disabled)
Bug: 112431924
Change-Id: I84c8fdeb97aba557a1f8fd2e71a2bb0d87b10636
The test is currently marked @Ignore because we haven't implemented
support for user data rollback yet.
Test: atest RollbackTest (selinux disabled)
Test: atest RollbackTest fails without the @Ignore.
Bug: 112431924
Change-Id: I3f7906001c932969bdf2125d198f379bf35a99fb
Require callers hold a new MANAGE_ROLLBACKS permission to interact with
the RollbackManager.
Bug: 112431924
Test: atest RollbackTest, with new test for permissions added,
and with selinux in permissive mode.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: I73f4f3457d85be580670cd69c89066d2cc348186
This change adds RollbackManagerService as a new system service for
managing apk level rollbacks.
To work properly this requires additional selinux policy changes. Fails
gracefully in case of selinux denials, until we have a chance to sort
out the proper selinux policy.
Bug: 112431924
Bug: 116512606
Test: atest RollbackTest, with selinux enforcement off.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: Id72aae9c4d8da9aaab3922ec9233ba335bc0198f