Merge "Call through to ART Service in notifyDexLoad if it is enabled."

This commit is contained in:
Martin Stjernholm
2022-12-15 00:57:29 +00:00
committed by Android (Google) Code Review
3 changed files with 89 additions and 13 deletions

View File

@@ -109,6 +109,7 @@ import com.android.server.ambientcontext.AmbientContextManagerService;
import com.android.server.appbinding.AppBindingService;
import com.android.server.art.ArtManagerLocal;
import com.android.server.art.ArtModuleServiceInitializer;
import com.android.server.art.DexUseManagerLocal;
import com.android.server.attention.AttentionManagerService;
import com.android.server.audio.AudioService;
import com.android.server.biometrics.AuthService;
@@ -1226,6 +1227,13 @@ public final class SystemServer implements Dumpable {
Watchdog.getInstance().resumeWatchingCurrentThread("packagemanagermain");
}
// DexUseManagerLocal needs to be loaded after PackageManagerLocal has been registered, but
// before PackageManagerService starts processing binder calls to notifyDexLoad.
// DexUseManagerLocal may also call artd, so ensure ArtModuleServiceManager is instantiated.
ArtModuleServiceInitializer.setArtModuleServiceManager(new ArtModuleServiceManager());
LocalManagerRegistry.addManager(
DexUseManagerLocal.class, DexUseManagerLocal.createInstance());
mFirstBoot = mPackageManagerService.isFirstBoot();
mPackageManager = mSystemContext.getPackageManager();
t.traceEnd();
@@ -2729,7 +2737,6 @@ public final class SystemServer implements Dumpable {
t.traceEnd();
t.traceBegin("ArtManagerLocal");
ArtModuleServiceInitializer.setArtModuleServiceManager(new ArtModuleServiceManager());
LocalManagerRegistry.addManager(ArtManagerLocal.class, new ArtManagerLocal(context));
t.traceEnd();