Fix the PMS live computer
Bug: 180050592
The live computer was created before PackageManagerService
mInstantAppResolverConnection was initialized. Unfortunately, the
live computer is used to initialized mInstantAppResolverConnection.
This change rebuilds the live computer after
mInstantAppResolverConnection is finally initialized.
Two additional cleanups are included, related to the use of the live
computer.
1. The ComputerEngineLocked now extends ComputerEngineLive. The
Locked class inherits the overriedes from the Live class, and the
now-redundant overrides in the Locked class are removed.
2. mSnapshotComputer is initialized to null in the constructor for
PackageManager Service. The snapshot should not be used until the
end of the constructor; setting the attribute to null will trigger
an NPE if the snapshot is used improperly.
See the bug description for specific tests. Instant apps are now
launched correctly.
All atests pass 100%.
Test: atest
* FrameworksServicesTests:AppsFilterTest
* FrameworksServicesTests:PackageInstallerSessionTest
* FrameworksServicesTests:PackageManagerServiceTest
* FrameworksServicesTests:PackageManagerSettingsTests
* FrameworksServicesTests:ScanTests
* FrameworksServicesTests:UserSystemPackageInstallerTest
* PackageManagerServiceBootTest
* UserLifecycleTests#startUser
* UserLifecycleTests#stopUser
* UserLifecycleTests#switchUser
* android.appsecurity.cts.EphemeralTest
* android.appsecurity.cts.InstantAppUserTest
Change-Id: Ic7e5a3ae9d661e2a7079d40a0f1a1ca6dc5badf2
1 file changed