Loading services/core/java/com/android/server/SystemServiceManager.java +6 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.annotation.Nullable; import android.annotation.UserIdInt; import android.content.Context; import android.content.pm.UserInfo; import android.os.Build; import android.os.Environment; import android.os.SystemClock; import android.os.Trace; Loading @@ -31,6 +32,7 @@ import android.util.Slog; import android.util.SparseArray; import com.android.internal.annotations.GuardedBy; import com.android.internal.os.ClassLoaderFactory; import com.android.internal.util.Preconditions; import com.android.server.SystemService.TargetUser; import com.android.server.am.EventLogTags; Loading Loading @@ -121,7 +123,10 @@ public final class SystemServiceManager implements Dumpable { if (pathClassLoader == null) { // NB: the parent class loader should always be the system server class loader. // Changing it has implications that require discussion with the mainline team. pathClassLoader = new PathClassLoader(path, this.getClass().getClassLoader()); pathClassLoader = (PathClassLoader) ClassLoaderFactory.createClassLoader( path, null /* librarySearchPath */, null /* libraryPermittedPath */, this.getClass().getClassLoader(), Build.VERSION.SDK_INT, true /* isNamespaceShared */, null /* classLoaderName */); mLoadedPaths.put(path, pathClassLoader); } final Class<SystemService> serviceClass = loadClassFromLoader(className, pathClassLoader); Loading Loading
services/core/java/com/android/server/SystemServiceManager.java +6 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.annotation.Nullable; import android.annotation.UserIdInt; import android.content.Context; import android.content.pm.UserInfo; import android.os.Build; import android.os.Environment; import android.os.SystemClock; import android.os.Trace; Loading @@ -31,6 +32,7 @@ import android.util.Slog; import android.util.SparseArray; import com.android.internal.annotations.GuardedBy; import com.android.internal.os.ClassLoaderFactory; import com.android.internal.util.Preconditions; import com.android.server.SystemService.TargetUser; import com.android.server.am.EventLogTags; Loading Loading @@ -121,7 +123,10 @@ public final class SystemServiceManager implements Dumpable { if (pathClassLoader == null) { // NB: the parent class loader should always be the system server class loader. // Changing it has implications that require discussion with the mainline team. pathClassLoader = new PathClassLoader(path, this.getClass().getClassLoader()); pathClassLoader = (PathClassLoader) ClassLoaderFactory.createClassLoader( path, null /* librarySearchPath */, null /* libraryPermittedPath */, this.getClass().getClassLoader(), Build.VERSION.SDK_INT, true /* isNamespaceShared */, null /* classLoaderName */); mLoadedPaths.put(path, pathClassLoader); } final Class<SystemService> serviceClass = loadClassFromLoader(className, pathClassLoader); Loading