Fix rollbacks in multi-user case.
There are a few assumptions in the rollback manager that fail in the multi-user case that need to be fixed: * getAllSessions only returns sessions for the specific user. * Session callbacks are only called on sessions associated with the registered user. * getPackageInfo only returns info for the specific user. Fix these issues so that rollbacks will work properly, in particular when the initial install session is owned by a non-system user. Bug: 129809507 Bug: 129397974 Test: On single user device: atest RollbackTest StagedRollbackTest Test: On primary user of multi-user device: atest RollbackTest StagedRollbackTest Test: On multi user device manually: adb install RollbackTestAppAv1.apk adb install --user 10 --enable-rollback RollbackTestAppAv2.apk -- verify the install succeeded -- adb shell pm rollback-app com.android.tests.rollback.testapp.A -- verify the rollback succeeded -- Test: On multi user device manually: adb install RollbackTestAppAv1.apk adb install --staged --user 10 --enable-rollback RollbackTestAppAv2.apk adb reboot -- verify the install succeeded -- adb shell pm rollback-app com.android.tests.rollback.testapp.A adb reboot -- verify the rollback succeeded -- Change-Id: I1a7cf101b3bc3575421629c4bf0ff63418eb8731
Loading
Please register or sign in to comment