Skip to content
Commit 88077d7e authored by Lee Shombert's avatar Lee Shombert
Browse files

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
parent 55908812
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment