Tell installd when boot completes.
installd can then clear the ".booting" marker from the dalvik-cache
(owned by root). This marker is used to detect boot loops.
bug: 18280671
(cherry picked from commit 76a748e62f354c799342044f724e1f4b80121837)
Change-Id: I2364c05837ac04d428b5a34ab1802964a11d2df4
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 92ad1ad..8a64aa6 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -147,7 +147,6 @@
private SystemServiceManager mSystemServiceManager;
// TODO: remove all of these references by improving dependency resolution and boot phases
- private Installer mInstaller;
private PowerManagerService mPowerManagerService;
private ActivityManagerService mActivityManagerService;
private DisplayManagerService mDisplayManagerService;
@@ -309,12 +308,13 @@
// Wait for installd to finish starting up so that it has a chance to
// create critical directories such as /data/user with the appropriate
// permissions. We need this to complete before we initialize other services.
- mInstaller = mSystemServiceManager.startService(Installer.class);
+ Installer installer = mSystemServiceManager.startService(Installer.class);
// Activity manager runs the show.
mActivityManagerService = mSystemServiceManager.startService(
ActivityManagerService.Lifecycle.class).getService();
mActivityManagerService.setSystemServiceManager(mSystemServiceManager);
+ mActivityManagerService.setInstaller(installer);
// Power manager needs to be started early because other services need it.
// Native daemons may be watching for it to be registered so it must be ready
@@ -345,7 +345,7 @@
// Start the package manager.
Slog.i(TAG, "Package Manager");
- mPackageManagerService = PackageManagerService.main(mSystemContext, mInstaller,
+ mPackageManagerService = PackageManagerService.main(mSystemContext, installer,
mFactoryTestMode != FactoryTest.FACTORY_TEST_OFF, mOnlyCore);
mFirstBoot = mPackageManagerService.isFirstBoot();
mPackageManager = mSystemContext.getPackageManager();