summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2018-12-19 08:35:24 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-12-19 08:35:24 +0000
commit7baf5a8d73841b4fb8de3c20aed83aea19e7f1c2 (patch)
tree0a5e883c58f561db7938775a5d52e5923ac7b7f0
parent6227b441a0235b4acacd8eb937fe3d5b4a098c79 (diff)
parent5d1814e1b36d4ec98cfff78ee8e1824c6dcad818 (diff)
Merge "Use the boot class loader as parent of system server loader."
-rw-r--r--core/java/com/android/internal/os/ZygoteInit.java6
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 8bdb000aad0e..c2c6ae6712ab 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -536,9 +536,11 @@ public class ZygoteInit {
static ClassLoader createPathClassLoader(String classPath, int targetSdkVersion) {
String libraryPath = System.getProperty("java.library.path");
+ // We use the boot class loader, that's what the runtime expects at AOT.
+ ClassLoader parent = ClassLoader.getSystemClassLoader().getParent();
+
return ClassLoaderFactory.createClassLoader(classPath, libraryPath, libraryPath,
- ClassLoader.getSystemClassLoader(), targetSdkVersion, true /* isNamespaceShared */,
- null /* classLoaderName */);
+ parent, targetSdkVersion, true /* isNamespaceShared */, null /* classLoaderName */);
}
/**