Loading core/java/android/app/ApplicationLoaders.java +3 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ class ApplicationLoaders return gApplicationLoaders; } public ClassLoader getClassLoader(String zip, String librarySearchPath, public ClassLoader getClassLoader(String zip, boolean isBundled, String librarySearchPath, String libraryPermittedPath, ClassLoader parent) { /* Loading Loading @@ -56,7 +56,8 @@ class ApplicationLoaders Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, zip); PathClassLoader pathClassloader = new PathClassLoader(zip, librarySearchPath, libraryPermittedPath, parent); new PathClassLoader(zip, isBundled, librarySearchPath, libraryPermittedPath, parent); Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); mLoaders.put(zip, pathClassloader); Loading core/java/android/app/LoadedApk.java +11 −4 Original line number Diff line number Diff line Loading @@ -359,12 +359,21 @@ public final class LoadedApk { } } String libraryPermittedPath = mAppDir + File.pathSeparator + mDataDir; boolean isBundledApp = false; if (mApplicationInfo.isSystemApp()) { isBundledApp = true; // Add path to system libraries to libPaths; // Access to system libs should be limited // to bundled applications; this is why updated // system apps are not included. libPaths.add(System.getProperty("java.library.path")); // This is necessary to grant bundled apps access to // libraries located in subdirectories of /system/lib libraryPermittedPath += File.pathSeparator + System.getProperty("java.library.path"); } final String librarySearchPath = TextUtils.join(File.pathSeparator, libPaths); Loading @@ -382,10 +391,8 @@ public final class LoadedApk { // as this is early and necessary. StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); String libraryPermittedPath = mAppDir + File.pathSeparator + mDataDir; mClassLoader = ApplicationLoaders.getDefault().getClassLoader(zip, librarySearchPath, libraryPermittedPath, mBaseClassLoader); mClassLoader = ApplicationLoaders.getDefault().getClassLoader(zip, isBundledApp, librarySearchPath, libraryPermittedPath, mBaseClassLoader); StrictMode.setThreadPolicy(oldPolicy); } else { Loading core/jni/android_app_NativeActivity.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ loadNativeCode_native(JNIEnv* env, jobject clazz, jstring path, jstring funcName bool needNativeBridge = false; void* handle = OpenNativeLibrary(env, sdkVersion, pathStr, classLoader, libraryPath, isolationPath); false, libraryPath, isolationPath); if (handle == NULL) { if (NativeBridgeIsSupported(pathStr)) { handle = NativeBridgeLoadLibrary(pathStr, RTLD_LAZY); Loading Loading
core/java/android/app/ApplicationLoaders.java +3 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ class ApplicationLoaders return gApplicationLoaders; } public ClassLoader getClassLoader(String zip, String librarySearchPath, public ClassLoader getClassLoader(String zip, boolean isBundled, String librarySearchPath, String libraryPermittedPath, ClassLoader parent) { /* Loading Loading @@ -56,7 +56,8 @@ class ApplicationLoaders Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, zip); PathClassLoader pathClassloader = new PathClassLoader(zip, librarySearchPath, libraryPermittedPath, parent); new PathClassLoader(zip, isBundled, librarySearchPath, libraryPermittedPath, parent); Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); mLoaders.put(zip, pathClassloader); Loading
core/java/android/app/LoadedApk.java +11 −4 Original line number Diff line number Diff line Loading @@ -359,12 +359,21 @@ public final class LoadedApk { } } String libraryPermittedPath = mAppDir + File.pathSeparator + mDataDir; boolean isBundledApp = false; if (mApplicationInfo.isSystemApp()) { isBundledApp = true; // Add path to system libraries to libPaths; // Access to system libs should be limited // to bundled applications; this is why updated // system apps are not included. libPaths.add(System.getProperty("java.library.path")); // This is necessary to grant bundled apps access to // libraries located in subdirectories of /system/lib libraryPermittedPath += File.pathSeparator + System.getProperty("java.library.path"); } final String librarySearchPath = TextUtils.join(File.pathSeparator, libPaths); Loading @@ -382,10 +391,8 @@ public final class LoadedApk { // as this is early and necessary. StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); String libraryPermittedPath = mAppDir + File.pathSeparator + mDataDir; mClassLoader = ApplicationLoaders.getDefault().getClassLoader(zip, librarySearchPath, libraryPermittedPath, mBaseClassLoader); mClassLoader = ApplicationLoaders.getDefault().getClassLoader(zip, isBundledApp, librarySearchPath, libraryPermittedPath, mBaseClassLoader); StrictMode.setThreadPolicy(oldPolicy); } else { Loading
core/jni/android_app_NativeActivity.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ loadNativeCode_native(JNIEnv* env, jobject clazz, jstring path, jstring funcName bool needNativeBridge = false; void* handle = OpenNativeLibrary(env, sdkVersion, pathStr, classLoader, libraryPath, isolationPath); false, libraryPath, isolationPath); if (handle == NULL) { if (NativeBridgeIsSupported(pathStr)) { handle = NativeBridgeLoadLibrary(pathStr, RTLD_LAZY); Loading