From 450864368b1535c95757e7c2f67f3024893b3961 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Fri, 10 Mar 2023 21:30:16 +0000 Subject: Initialize AppHibernationService before ArtManagerLocal. ArtManagerLocal depends on it, and in particular it may be needed when PackageManagerService.updatePackagesIfNeeded runs, to skip hibernated packages. This also moves AppHibernationService out of the block that only gets initialised when mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL, which is necessary since ArtManagerLocal is initialised outside that condition. Test: Boot and execute REASON_FIRST_BOOT Bug: 265782156 Change-Id: Ic76cb4d5301ab67d62f7802936298b3175496640 --- services/java/com/android/server/SystemServer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'services/java') diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index edfe95efe7f9..9a4388515030 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -1793,6 +1793,10 @@ public final class SystemServer implements Dumpable { } t.traceEnd(); + t.traceBegin("StartAppHibernationService"); + mSystemServiceManager.startService(APP_HIBERNATION_SERVICE_CLASS); + t.traceEnd(); + t.traceBegin("ArtManagerLocal"); DexOptHelper.initializeArtManagerLocal(context, mPackageManagerService); t.traceEnd(); @@ -2314,10 +2318,6 @@ public final class SystemServer implements Dumpable { mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS); t.traceEnd(); - t.traceBegin("StartAppHibernationService"); - mSystemServiceManager.startService(APP_HIBERNATION_SERVICE_CLASS); - t.traceEnd(); - if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) { t.traceBegin("StartGestureLauncher"); mSystemServiceManager.startService(GestureLauncherService.class); -- cgit v1.2.3-59-g8ed1b