Add more packages to Settings#mInstallerPackages.

We rely on this set to tell us if a package being uninstalled might be
mentioned in an InstallSource object so we can remove the dangling
references. We have code to correctly clean up initiating and
originating package names, but we need to add them to the set to make
sure that clean up is called.

Includes some light refactoring. As a happy side-effect, ensures that
the strings added to the set are all interned.

Test: atest PackageManagerTests PackageVerifierTest
Bug: 134746019
Bug: 146555198
Change-Id: Iffc08d94a5dc9cb8f0d1acbbcdbd6d1be1d69eb1
2 files changed