diff options
| author | Richard Uhler <ruhler@google.com> | 2019-04-01 13:02:31 +0100 | 
|---|---|---|
| committer | Narayan Kamath <narayan@google.com> | 2019-04-05 11:54:44 +0000 | 
| commit | 82913b712364b4ea796cdb604bbd93964b567caa (patch) | |
| tree | b0939be5c12f81db89f6baf73cca20ba071cc2b2 /tools/aapt2/diff/Diff.cpp | |
| parent | e0283ded0a7b2a2010f614943f939e1adc81ebeb (diff) | |
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 --
(cherry picked from commit d81ff978667a776884362ef2461b3015c56117d1)
Merged-In: I1a7cf101b3bc3575421629c4bf0ff63418eb8731
Change-Id: I1a7cf101b3bc3575421629c4bf0ff63418eb8731
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions
