Fix ART Service initialization order problems.
- Move ArtManagerLocal initialization before the boot compilation step (UpdatePackagesIfNeeded). - Delay scheduling the background dexopt job because the job scheduler hasn't been started at that point. Test: Boot with dalvik.vm.useartservice=true and check logcat that ART Service starts up and a first-boot dexopt runs without errors. Bug: 266028904 Change-Id: I108b877f2a99c69c20f7209339cd193c2d41e7ea
This commit is contained in:
@@ -1789,6 +1789,10 @@ public final class SystemServer implements Dumpable {
|
||||
}
|
||||
t.traceEnd();
|
||||
|
||||
t.traceBegin("ArtManagerLocal");
|
||||
DexOptHelper.initializeArtManagerLocal(context, mPackageManagerService);
|
||||
t.traceEnd();
|
||||
|
||||
t.traceBegin("UpdatePackagesIfNeeded");
|
||||
try {
|
||||
Watchdog.getInstance().pauseWatchingCurrentThread("dexopt");
|
||||
@@ -2737,10 +2741,6 @@ public final class SystemServer implements Dumpable {
|
||||
mSystemServiceManager.startService(PermissionPolicyService.class);
|
||||
t.traceEnd();
|
||||
|
||||
t.traceBegin("ArtManagerLocal");
|
||||
DexOptHelper.initializeArtManagerLocal(context, mPackageManagerService);
|
||||
t.traceEnd();
|
||||
|
||||
t.traceBegin("MakePackageManagerServiceReady");
|
||||
mPackageManagerService.systemReady();
|
||||
t.traceEnd();
|
||||
|
||||
Reference in New Issue
Block a user