Merge "Set threads' contextClassLoader during LoadedApk.makeApplication." into lmp-dev

This commit is contained in:
Brian Carlstrom
2014-10-16 01:01:25 +00:00
committed by Android (Google) Code Review

View File

@@ -360,7 +360,6 @@ public final class LoadedApk {
mClassLoader = ApplicationLoaders.getDefault().getClassLoader(zip, lib,
mBaseClassLoader);
initializeJavaContextClassLoader();
StrictMode.setThreadPolicy(oldPolicy);
} else {
@@ -552,6 +551,9 @@ public final class LoadedApk {
try {
java.lang.ClassLoader cl = getClassLoader();
if (!mPackageName.equals("android")) {
initializeJavaContextClassLoader();
}
ContextImpl appContext = ContextImpl.createAppContext(mActivityThread, this);
app = mActivityThread.mInstrumentation.newApplication(
cl, appClass, appContext);