Keep enabled state across system uninstall

This change retains the original application state when uninstalling
updates. This ensures that if the user explicitly disabled the
application prior to uninstall updates, it remains that way after the
system version is re-installed.

Prior to this change, an updated system app, when uninstalled would have
its PackageUserState removed. When the system version was later
installed again, a new PackageUserState would be constructed with the
default state (enabled).

Bug: 190343571
Test: Manual; disable, uninstall update to system app
Change-Id: I5808dd7dfdad98bc9cbe5ec035249cc24ec2619f
1 file changed