diff options
author | Jeff Sharkey <jsharkey@google.com> | 2021-03-09 23:01:37 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-03-09 23:01:37 +0000 |
commit | 3f0f0b686aff81e4fe49719b4743fd19e10740af (patch) | |
tree | 314af86e6bb155bb3e437e6cb235cb99a5fbb263 /core/java/com | |
parent | 8e97fea3c20f2ea9aad202f07a30b7c80156f25c (diff) | |
parent | 7adcb4f170f4b5ea5ee5471e32ec3a1308f7e10e (diff) |
Merge "Wait for installd to start to perform dexopt operation"
Diffstat (limited to 'core/java/com')
-rw-r--r-- | core/java/com/android/internal/os/ZygoteInit.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index fe87b64940fb..c220428df58b 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -648,8 +648,6 @@ public class ZygoteInit { */ private static void performSystemServerDexOpt(String classPath) { final String[] classPathElements = classPath.split(":"); - final IInstalld installd = IInstalld.Stub - .asInterface(ServiceManager.getService("installd")); final String instructionSet = VMRuntime.getRuntime().vmInstructionSet(); String classPathForElement = ""; @@ -686,6 +684,10 @@ public class ZygoteInit { final String uuid = StorageManager.UUID_PRIVATE_INTERNAL; final String seInfo = null; 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 { installd.dexopt(classPathElement, Process.SYSTEM_UID, packageName, instructionSet, dexoptNeeded, outputPath, dexFlags, systemServerFilter, |