Merge "Fix getPackageInfo("android") in the system server." into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9301eafbcc
@@ -1742,6 +1742,12 @@ public final class ActivityThread {
|
|||||||
new LoadedApk(this, aInfo, compatInfo, baseLoader,
|
new LoadedApk(this, aInfo, compatInfo, baseLoader,
|
||||||
securityViolation, includeCode &&
|
securityViolation, includeCode &&
|
||||||
(aInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0, registerPackage);
|
(aInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0, registerPackage);
|
||||||
|
|
||||||
|
if (mSystemThread && "android".equals(aInfo.packageName)) {
|
||||||
|
packageInfo.installSystemApplicationInfo(aInfo,
|
||||||
|
getSystemContext().mPackageInfo.getClassLoader());
|
||||||
|
}
|
||||||
|
|
||||||
if (includeCode) {
|
if (includeCode) {
|
||||||
mPackages.put(aInfo.packageName,
|
mPackages.put(aInfo.packageName,
|
||||||
new WeakReference<LoadedApk>(packageInfo));
|
new WeakReference<LoadedApk>(packageInfo));
|
||||||
@@ -1802,10 +1808,6 @@ public final class ActivityThread {
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
getSystemContext().installSystemApplicationInfo(info, classLoader);
|
getSystemContext().installSystemApplicationInfo(info, classLoader);
|
||||||
|
|
||||||
// The code package for "android" in the system server needs
|
|
||||||
// to be the system context's package.
|
|
||||||
mPackages.put("android", new WeakReference<LoadedApk>(getSystemContext().mPackageInfo));
|
|
||||||
|
|
||||||
// give ourselves a default profiler
|
// give ourselves a default profiler
|
||||||
mProfiler = new Profiler();
|
mProfiler = new Profiler();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user