Fix PackageSetting isUpdatedSystemApp and SYSTEM_EXT rescan
When updating a PackageSetting, the existing one was not
being considered, causing them to be assigned incorrectly
on re-scan/re-install.
The updatedSystemApp state was also being toggled incorrectly,
as the previous code relied on the fact that a new Package
object was created, implicitly resetting the fields as it
was a new Java object with re-initialized fields.
This disables the field explicitly when re-enabling a system app,
as this action re-uses the existing PackageSetting that was
previously associated with the /data copy.
Also fixes scanning as SYSTEM_EXT when the disabled system
package was also SYSTEM_EXT.
Bug: 135203078
Bug: 149994952
Test: atest NexusLauncherTests:com.android.quickstep.StartLauncherViaGestureTests
Merged-In: I81d126efc144725cac8af6810d33952295b375e1
Change-Id: I81d126efc144725cac8af6810d33952295b375e1
4 files changed