Loading core/java/android/app/ActivityThread.java +1 −0 Original line number Diff line number Diff line Loading @@ -3181,6 +3181,7 @@ public final class ActivityThread { instrApp.sourceDir = ii.sourceDir; instrApp.publicSourceDir = ii.publicSourceDir; instrApp.dataDir = ii.dataDir; instrApp.nativeLibraryDir = ii.nativeLibraryDir; LoadedApk pi = getPackageInfo(instrApp, appContext.getClassLoader(), false, true); ContextImpl instrContext = new ContextImpl(); Loading core/java/android/app/ApplicationLoaders.java +5 −5 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.app; import dalvik.system.PathClassLoader; import java.util.HashMap; import java.util.Map; class ApplicationLoaders { Loading @@ -27,8 +28,7 @@ class ApplicationLoaders return gApplicationLoaders; } public ClassLoader getClassLoader(String zip, String appDataDir, ClassLoader parent) public ClassLoader getClassLoader(String zip, String libPath, ClassLoader parent) { /* * This is the parent we use if they pass "null" in. In theory Loading @@ -49,13 +49,13 @@ class ApplicationLoaders * new ClassLoader for the zip archive. */ if (parent == baseParent) { ClassLoader loader = (ClassLoader)mLoaders.get(zip); ClassLoader loader = mLoaders.get(zip); if (loader != null) { return loader; } PathClassLoader pathClassloader = new PathClassLoader(zip, appDataDir + "/lib", parent); new PathClassLoader(zip, libPath, parent); mLoaders.put(zip, pathClassloader); return pathClassloader; Loading @@ -65,7 +65,7 @@ class ApplicationLoaders } } private final HashMap mLoaders = new HashMap(); private final Map<String, ClassLoader> mLoaders = new HashMap<String, ClassLoader>(); private static final ApplicationLoaders gApplicationLoaders = new ApplicationLoaders(); Loading core/java/android/app/LoadedApk.java +6 −2 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ final class LoadedApk { private final String mResDir; private final String[] mSharedLibraries; private final String mDataDir; private final String mLibDir; private final File mDataDirFile; private final ClassLoader mBaseClassLoader; private final boolean mSecurityViolation; Loading Loading @@ -108,6 +109,7 @@ final class LoadedApk { mSharedLibraries = aInfo.sharedLibraryFiles; mDataDir = aInfo.dataDir; mDataDirFile = mDataDir != null ? new File(mDataDir) : null; mLibDir = aInfo.nativeLibraryDir; mBaseClassLoader = baseLoader; mSecurityViolation = securityViolation; mIncludeCode = includeCode; Loading Loading @@ -140,6 +142,7 @@ final class LoadedApk { mSharedLibraries = null; mDataDir = null; mDataDirFile = null; mLibDir = null; mBaseClassLoader = null; mSecurityViolation = false; mIncludeCode = true; Loading Loading @@ -279,11 +282,12 @@ final class LoadedApk { * create the class loader. */ if (ActivityThread.localLOGV) Slog.v(ActivityThread.TAG, "Class path: " + zip); if (ActivityThread.localLOGV) Slog.v(ActivityThread.TAG, "Class path: " + zip + ", JNI path: " + mLibDir); mClassLoader = ApplicationLoaders.getDefault().getClassLoader( zip, mDataDir, mBaseClassLoader); zip, mLibDir, mBaseClassLoader); initializeJavaContextClassLoader(); } else { if (mBaseClassLoader == null) { Loading core/java/android/content/pm/ApplicationInfo.java +11 −9 Original line number Diff line number Diff line Loading @@ -290,14 +290,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int FLAG_FORWARD_LOCK = 1<<29; /** * Value for {@link #flags}: Set to true if the application is * native-debuggable, i.e. embeds a gdbserver binary in its .apk * * {@hide} */ public static final int FLAG_NATIVE_DEBUGGABLE = 1<<28; /** * Value for {@link #flags}: set to <code>true</code> if the application * has reported that it is heavy-weight, and thus can not participate in Loading Loading @@ -360,6 +352,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public String dataDir; /** * Full path to the directory where native JNI libraries are stored. * * {@hide} */ public String nativeLibraryDir; /** * The kernel user-ID that has been assigned to this application; * currently this is not a unique ID (multiple applications can have Loading Loading @@ -452,6 +451,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { flags = orig.flags; sourceDir = orig.sourceDir; publicSourceDir = orig.publicSourceDir; nativeLibraryDir = orig.nativeLibraryDir; resourceDirs = orig.resourceDirs; sharedLibraryFiles = orig.sharedLibraryFiles; dataDir = orig.dataDir; Loading Loading @@ -483,6 +483,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeInt(flags); dest.writeString(sourceDir); dest.writeString(publicSourceDir); dest.writeString(nativeLibraryDir); dest.writeStringArray(resourceDirs); dest.writeStringArray(sharedLibraryFiles); dest.writeString(dataDir); Loading Loading @@ -514,6 +515,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { flags = source.readInt(); sourceDir = source.readString(); publicSourceDir = source.readString(); nativeLibraryDir = source.readString(); resourceDirs = source.readStringArray(); sharedLibraryFiles = source.readStringArray(); dataDir = source.readString(); Loading core/java/android/content/pm/InstrumentationInfo.java +11 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,13 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable { */ public String dataDir; /** * Full path to the directory where the native JNI libraries are stored. * * {@hide} */ public String nativeLibraryDir; /** * Specifies whether or not this instrumentation will handle profiling. */ Loading @@ -68,6 +75,7 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable { sourceDir = orig.sourceDir; publicSourceDir = orig.publicSourceDir; dataDir = orig.dataDir; nativeLibraryDir = orig.nativeLibraryDir; handleProfiling = orig.handleProfiling; functionalTest = orig.functionalTest; } Loading @@ -88,6 +96,7 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable { dest.writeString(sourceDir); dest.writeString(publicSourceDir); dest.writeString(dataDir); dest.writeString(nativeLibraryDir); dest.writeInt((handleProfiling == false) ? 0 : 1); dest.writeInt((functionalTest == false) ? 0 : 1); } Loading @@ -108,6 +117,7 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable { sourceDir = source.readString(); publicSourceDir = source.readString(); dataDir = source.readString(); nativeLibraryDir = source.readString(); handleProfiling = source.readInt() != 0; functionalTest = source.readInt() != 0; } Loading Loading
core/java/android/app/ActivityThread.java +1 −0 Original line number Diff line number Diff line Loading @@ -3181,6 +3181,7 @@ public final class ActivityThread { instrApp.sourceDir = ii.sourceDir; instrApp.publicSourceDir = ii.publicSourceDir; instrApp.dataDir = ii.dataDir; instrApp.nativeLibraryDir = ii.nativeLibraryDir; LoadedApk pi = getPackageInfo(instrApp, appContext.getClassLoader(), false, true); ContextImpl instrContext = new ContextImpl(); Loading
core/java/android/app/ApplicationLoaders.java +5 −5 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.app; import dalvik.system.PathClassLoader; import java.util.HashMap; import java.util.Map; class ApplicationLoaders { Loading @@ -27,8 +28,7 @@ class ApplicationLoaders return gApplicationLoaders; } public ClassLoader getClassLoader(String zip, String appDataDir, ClassLoader parent) public ClassLoader getClassLoader(String zip, String libPath, ClassLoader parent) { /* * This is the parent we use if they pass "null" in. In theory Loading @@ -49,13 +49,13 @@ class ApplicationLoaders * new ClassLoader for the zip archive. */ if (parent == baseParent) { ClassLoader loader = (ClassLoader)mLoaders.get(zip); ClassLoader loader = mLoaders.get(zip); if (loader != null) { return loader; } PathClassLoader pathClassloader = new PathClassLoader(zip, appDataDir + "/lib", parent); new PathClassLoader(zip, libPath, parent); mLoaders.put(zip, pathClassloader); return pathClassloader; Loading @@ -65,7 +65,7 @@ class ApplicationLoaders } } private final HashMap mLoaders = new HashMap(); private final Map<String, ClassLoader> mLoaders = new HashMap<String, ClassLoader>(); private static final ApplicationLoaders gApplicationLoaders = new ApplicationLoaders(); Loading
core/java/android/app/LoadedApk.java +6 −2 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ final class LoadedApk { private final String mResDir; private final String[] mSharedLibraries; private final String mDataDir; private final String mLibDir; private final File mDataDirFile; private final ClassLoader mBaseClassLoader; private final boolean mSecurityViolation; Loading Loading @@ -108,6 +109,7 @@ final class LoadedApk { mSharedLibraries = aInfo.sharedLibraryFiles; mDataDir = aInfo.dataDir; mDataDirFile = mDataDir != null ? new File(mDataDir) : null; mLibDir = aInfo.nativeLibraryDir; mBaseClassLoader = baseLoader; mSecurityViolation = securityViolation; mIncludeCode = includeCode; Loading Loading @@ -140,6 +142,7 @@ final class LoadedApk { mSharedLibraries = null; mDataDir = null; mDataDirFile = null; mLibDir = null; mBaseClassLoader = null; mSecurityViolation = false; mIncludeCode = true; Loading Loading @@ -279,11 +282,12 @@ final class LoadedApk { * create the class loader. */ if (ActivityThread.localLOGV) Slog.v(ActivityThread.TAG, "Class path: " + zip); if (ActivityThread.localLOGV) Slog.v(ActivityThread.TAG, "Class path: " + zip + ", JNI path: " + mLibDir); mClassLoader = ApplicationLoaders.getDefault().getClassLoader( zip, mDataDir, mBaseClassLoader); zip, mLibDir, mBaseClassLoader); initializeJavaContextClassLoader(); } else { if (mBaseClassLoader == null) { Loading
core/java/android/content/pm/ApplicationInfo.java +11 −9 Original line number Diff line number Diff line Loading @@ -290,14 +290,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int FLAG_FORWARD_LOCK = 1<<29; /** * Value for {@link #flags}: Set to true if the application is * native-debuggable, i.e. embeds a gdbserver binary in its .apk * * {@hide} */ public static final int FLAG_NATIVE_DEBUGGABLE = 1<<28; /** * Value for {@link #flags}: set to <code>true</code> if the application * has reported that it is heavy-weight, and thus can not participate in Loading Loading @@ -360,6 +352,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public String dataDir; /** * Full path to the directory where native JNI libraries are stored. * * {@hide} */ public String nativeLibraryDir; /** * The kernel user-ID that has been assigned to this application; * currently this is not a unique ID (multiple applications can have Loading Loading @@ -452,6 +451,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { flags = orig.flags; sourceDir = orig.sourceDir; publicSourceDir = orig.publicSourceDir; nativeLibraryDir = orig.nativeLibraryDir; resourceDirs = orig.resourceDirs; sharedLibraryFiles = orig.sharedLibraryFiles; dataDir = orig.dataDir; Loading Loading @@ -483,6 +483,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeInt(flags); dest.writeString(sourceDir); dest.writeString(publicSourceDir); dest.writeString(nativeLibraryDir); dest.writeStringArray(resourceDirs); dest.writeStringArray(sharedLibraryFiles); dest.writeString(dataDir); Loading Loading @@ -514,6 +515,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { flags = source.readInt(); sourceDir = source.readString(); publicSourceDir = source.readString(); nativeLibraryDir = source.readString(); resourceDirs = source.readStringArray(); sharedLibraryFiles = source.readStringArray(); dataDir = source.readString(); Loading
core/java/android/content/pm/InstrumentationInfo.java +11 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,13 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable { */ public String dataDir; /** * Full path to the directory where the native JNI libraries are stored. * * {@hide} */ public String nativeLibraryDir; /** * Specifies whether or not this instrumentation will handle profiling. */ Loading @@ -68,6 +75,7 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable { sourceDir = orig.sourceDir; publicSourceDir = orig.publicSourceDir; dataDir = orig.dataDir; nativeLibraryDir = orig.nativeLibraryDir; handleProfiling = orig.handleProfiling; functionalTest = orig.functionalTest; } Loading @@ -88,6 +96,7 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable { dest.writeString(sourceDir); dest.writeString(publicSourceDir); dest.writeString(dataDir); dest.writeString(nativeLibraryDir); dest.writeInt((handleProfiling == false) ? 0 : 1); dest.writeInt((functionalTest == false) ? 0 : 1); } Loading @@ -108,6 +117,7 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable { sourceDir = source.readString(); publicSourceDir = source.readString(); dataDir = source.readString(); nativeLibraryDir = source.readString(); handleProfiling = source.readInt() != 0; functionalTest = source.readInt() != 0; } Loading