summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2018-12-19 01:08:02 -0800
committer android-build-merger <android-build-merger@google.com> 2018-12-19 01:08:02 -0800
commit955963c1093b34cd6e76fd5c726fe5503cc3d76c (patch)
tree6564f8aac78c7af2554d1485c5f87641bbb9f20d
parent4e0b70bd6f28f271031a532c5cba2579f2435533 (diff)
parentc2a38e56f36bf30970d67a3392353761f8ebb1e9 (diff)
Merge "Use the boot class loader as parent of system server loader." am: 7baf5a8d73
am: c2a38e56f3 Change-Id: I5b467cd965f89240910f6a286d723a50d621b81b
-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 */);
}
/**