Merge "Wait for installd to start to perform dexopt operation" am: 3f0f0b686a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1615847

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I77a5719fe279c066386fbff2c279bb4caee3c052
This commit is contained in:
Jeff Sharkey
2021-03-09 23:23:24 +00:00
committed by Automerger Merge Worker

View File

@@ -648,8 +648,6 @@ public class ZygoteInit {
*/ */
private static void performSystemServerDexOpt(String classPath) { private static void performSystemServerDexOpt(String classPath) {
final String[] classPathElements = classPath.split(":"); final String[] classPathElements = classPath.split(":");
final IInstalld installd = IInstalld.Stub
.asInterface(ServiceManager.getService("installd"));
final String instructionSet = VMRuntime.getRuntime().vmInstructionSet(); final String instructionSet = VMRuntime.getRuntime().vmInstructionSet();
String classPathForElement = ""; String classPathForElement = "";
@@ -686,6 +684,10 @@ public class ZygoteInit {
final String uuid = StorageManager.UUID_PRIVATE_INTERNAL; final String uuid = StorageManager.UUID_PRIVATE_INTERNAL;
final String seInfo = null; final String seInfo = null;
final int targetSdkVersion = 0; // SystemServer targets the system's SDK version final int targetSdkVersion = 0; // SystemServer targets the system's SDK version
// Wait for installd to be made available
IInstalld installd = IInstalld.Stub.asInterface(
ServiceManager.waitForService("installd"));
try { try {
installd.dexopt(classPathElement, Process.SYSTEM_UID, packageName, installd.dexopt(classPathElement, Process.SYSTEM_UID, packageName,
instructionSet, dexoptNeeded, outputPath, dexFlags, systemServerFilter, instructionSet, dexoptNeeded, outputPath, dexFlags, systemServerFilter,