Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d01bc4d8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Create linker namespace in startServiceFromJar" am: e59313ab am: 4828af4c

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

Change-Id: I4638a1938eeeb524857e9b58ae86d0736389bf8d
parents 2887a094 4828af4c
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.NonNull;
import android.annotation.UserIdInt;
import android.annotation.UserIdInt;
import android.content.Context;
import android.content.Context;
import android.content.pm.UserInfo;
import android.content.pm.UserInfo;
import android.os.Build;
import android.os.Environment;
import android.os.Environment;
import android.os.SystemClock;
import android.os.SystemClock;
import android.os.Trace;
import android.os.Trace;
@@ -28,6 +29,7 @@ import android.os.UserManagerInternal;
import android.util.ArrayMap;
import android.util.ArrayMap;
import android.util.Slog;
import android.util.Slog;


import com.android.internal.os.ClassLoaderFactory;
import com.android.server.SystemService.TargetUser;
import com.android.server.SystemService.TargetUser;
import com.android.server.utils.TimingsTraceAndSlog;
import com.android.server.utils.TimingsTraceAndSlog;


@@ -99,7 +101,10 @@ public class SystemServiceManager {
        if (pathClassLoader == null) {
        if (pathClassLoader == null) {
            // NB: the parent class loader should always be the system server class loader.
            // NB: the parent class loader should always be the system server class loader.
            // Changing it has implications that require discussion with the mainline team.
            // 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);
            mLoadedPaths.put(path, pathClassLoader);
        }
        }
        final Class<SystemService> serviceClass = loadClassFromLoader(className, pathClassLoader);
        final Class<SystemService> serviceClass = loadClassFromLoader(className, pathClassLoader);