From 212ca4e19c5bb4552194af988d3d92d6ccc6bb12 Mon Sep 17 00:00:00 2001 From: Alan Stokes Date: Wed, 17 Nov 2021 14:28:43 +0000 Subject: [PATCH] Add Isolated Compilation service Create a skeleton system service which will be used to run Isolated Compilation using a system server classpath fragment in the CompOS APEX. This has no effect if the CompOS APEX is not present (i.e. isolated compilation is not enabled). Bug: 199147668 Test: starts up with CompOS present & not Change-Id: I5ee853cfaf4d9633dd8db348d13e0dfe00bd4dca --- core/res/AndroidManifest.xml | 4 ++++ services/java/com/android/server/SystemServer.java | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index d727a55615f21..261334b562159 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -6252,6 +6252,10 @@ android:permission="android.permission.BIND_JOB_SERVICE"> + + + diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index aca7cc9070b17..c719f4ade0a3e 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -364,6 +364,8 @@ public final class SystemServer implements Dumpable { "com.android.server.blob.BlobStoreManagerService"; private static final String APP_SEARCH_MANAGER_SERVICE_CLASS = "com.android.server.appsearch.AppSearchManagerService"; + private static final String ISOLATED_COMPILATION_SERVICE_CLASS = + "com.android.server.compos.IsolatedCompilationService"; private static final String ROLLBACK_MANAGER_SERVICE_CLASS = "com.android.server.rollback.RollbackManagerService"; private static final String ALARM_MANAGER_SERVICE_CLASS = @@ -2651,6 +2653,12 @@ public final class SystemServer implements Dumpable { mSystemServiceManager.startService(APP_SEARCH_MANAGER_SERVICE_CLASS); t.traceEnd(); + if (SystemProperties.getBoolean("ro.config.isolated_compilation_enabled", false)) { + t.traceBegin("IsolatedCompilationService"); + mSystemServiceManager.startService(ISOLATED_COMPILATION_SERVICE_CLASS); + t.traceEnd(); + } + t.traceBegin("StartMediaCommunicationService"); mSystemServiceManager.startService(MEDIA_COMMUNICATION_SERVICE_CLASS); t.traceEnd();