summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Narayan Kamath <narayan@google.com> 2014-11-03 12:45:15 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2014-11-03 12:45:16 +0000
commit9301eafbcc39f9cf6980f937f78886f35dec9d9f (patch)
tree55dde3c21ecc3c85deff0cb3fee23579635ea8c6
parent27be7b3586dcf87da4badd55693de4fc1c0bfaa7 (diff)
parentcb383183d722a9ef03ab8b8cb0d0e419efd96598 (diff)
Merge "Fix getPackageInfo("android") in the system server." into lmp-mr1-dev
-rw-r--r--core/java/android/app/ActivityThread.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index fa15ad758cc6..cf6c04959de8 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -1742,6 +1742,12 @@ public final class ActivityThread {
new LoadedApk(this, aInfo, compatInfo, baseLoader,
securityViolation, includeCode &&
(aInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0, registerPackage);
+
+ if (mSystemThread && "android".equals(aInfo.packageName)) {
+ packageInfo.installSystemApplicationInfo(aInfo,
+ getSystemContext().mPackageInfo.getClassLoader());
+ }
+
if (includeCode) {
mPackages.put(aInfo.packageName,
new WeakReference<LoadedApk>(packageInfo));
@@ -1802,10 +1808,6 @@ public final class ActivityThread {
synchronized (this) {
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
mProfiler = new Profiler();
}