Loading core/java/android/app/LoadedApk.java +17 −13 Original line number Diff line number Diff line Loading @@ -969,6 +969,15 @@ public final class LoadedApk { } } List<String> nativeSharedLibraries = new ArrayList<>(); if (mApplicationInfo.sharedLibraryInfos != null) { for (SharedLibraryInfo info : mApplicationInfo.sharedLibraryInfos) { if (info.isNative()) { nativeSharedLibraries.add(info.getName()); } } } // If we're not asked to include code, we construct a classloader that has // no code path included. We still need to set up the library search paths // and permitted path because NativeActivity relies on it (it attempts to Loading @@ -977,10 +986,14 @@ public final class LoadedApk { if (!mIncludeCode) { if (mDefaultClassLoader == null) { StrictMode.ThreadPolicy oldPolicy = allowThreadDiskReads(); mDefaultClassLoader = ApplicationLoaders.getDefault().getClassLoader( mDefaultClassLoader = ApplicationLoaders.getDefault() .getClassLoaderWithSharedLibraries( "" /* codePath */, mApplicationInfo.targetSdkVersion, isBundledApp, librarySearchPath, libraryPermittedPath, mBaseClassLoader, null /* classLoaderName */); null /* classLoaderName */, null /* sharedLibraries */, nativeSharedLibraries, null /* sharedLibrariesLoadedAfterApp */); setThreadPolicy(oldPolicy); mAppComponentFactory = AppComponentFactory.DEFAULT; } Loading Loading @@ -1030,15 +1043,6 @@ public final class LoadedApk { createSharedLibrariesLoaders(mApplicationInfo.sharedLibraryInfos, isBundledApp, librarySearchPath, libraryPermittedPath); List<String> nativeSharedLibraries = new ArrayList<>(); if (mApplicationInfo.sharedLibraryInfos != null) { for (SharedLibraryInfo info : mApplicationInfo.sharedLibraryInfos) { if (info.isNative()) { nativeSharedLibraries.add(info.getName()); } } } mDefaultClassLoader = ApplicationLoaders.getDefault().getClassLoaderWithSharedLibraries( zip, mApplicationInfo.targetSdkVersion, isBundledApp, librarySearchPath, libraryPermittedPath, mBaseClassLoader, Loading Loading
core/java/android/app/LoadedApk.java +17 −13 Original line number Diff line number Diff line Loading @@ -969,6 +969,15 @@ public final class LoadedApk { } } List<String> nativeSharedLibraries = new ArrayList<>(); if (mApplicationInfo.sharedLibraryInfos != null) { for (SharedLibraryInfo info : mApplicationInfo.sharedLibraryInfos) { if (info.isNative()) { nativeSharedLibraries.add(info.getName()); } } } // If we're not asked to include code, we construct a classloader that has // no code path included. We still need to set up the library search paths // and permitted path because NativeActivity relies on it (it attempts to Loading @@ -977,10 +986,14 @@ public final class LoadedApk { if (!mIncludeCode) { if (mDefaultClassLoader == null) { StrictMode.ThreadPolicy oldPolicy = allowThreadDiskReads(); mDefaultClassLoader = ApplicationLoaders.getDefault().getClassLoader( mDefaultClassLoader = ApplicationLoaders.getDefault() .getClassLoaderWithSharedLibraries( "" /* codePath */, mApplicationInfo.targetSdkVersion, isBundledApp, librarySearchPath, libraryPermittedPath, mBaseClassLoader, null /* classLoaderName */); null /* classLoaderName */, null /* sharedLibraries */, nativeSharedLibraries, null /* sharedLibrariesLoadedAfterApp */); setThreadPolicy(oldPolicy); mAppComponentFactory = AppComponentFactory.DEFAULT; } Loading Loading @@ -1030,15 +1043,6 @@ public final class LoadedApk { createSharedLibrariesLoaders(mApplicationInfo.sharedLibraryInfos, isBundledApp, librarySearchPath, libraryPermittedPath); List<String> nativeSharedLibraries = new ArrayList<>(); if (mApplicationInfo.sharedLibraryInfos != null) { for (SharedLibraryInfo info : mApplicationInfo.sharedLibraryInfos) { if (info.isNative()) { nativeSharedLibraries.add(info.getName()); } } } mDefaultClassLoader = ApplicationLoaders.getDefault().getClassLoaderWithSharedLibraries( zip, mApplicationInfo.targetSdkVersion, isBundledApp, librarySearchPath, libraryPermittedPath, mBaseClassLoader, Loading