Skip to content
Commit 6e7dced6 authored by Winson's avatar Winson Committed by Patrick Baumann
Browse files

Fix uninstall system updates disabling stub for single user

A previous fix was introduced to re-enable compressed packages if any
user on the device had the package installed + enabled, but this
introduced a regression if there was only 1 user on device.

It treated an uninstall updates command as if it was disabling for
the primary user, whereas those should actually be handled
independently, allowing an app to remain installed and enabled even
after uninstalling updates.

This was caught in the initial change, but ignored as an unimportant
quirk of the uninstall updates system. This was in error and thus the
tests for this feature were also broken and needed to be fixed to match
the preserving behavior.

This tacks onto a previous change that records the user state for a
package before deletePackageX actually runs, and resets the state
objects afterwards. This informs whether any user has the package
installed + enabled to re-uncompress the stub to /data.

Bug: 191988668

Test: atest SystemStubMultiUserDisableUninstallTest

Change-Id: I670163e01d13ee5fdd2ebc6a046fa55a5398b290
Merged-In: I670163e01d13ee5fdd2ebc6a046fa55a5398b290
parent 6eac5ad9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment