Merge change 26935 into eclair
* changes: Fix bug 2129190 The context used by the status bar (i.e., the system context) was not properly initialized to have the right ApplicationInfo inside its PackageInfo. This eventually caused it to believe that it was running at 160dpi.
This commit is contained in:
@@ -292,9 +292,9 @@ public final class ActivityThread {
|
||||
}
|
||||
|
||||
public PackageInfo(ActivityThread activityThread, String name,
|
||||
Context systemContext) {
|
||||
Context systemContext, ApplicationInfo info) {
|
||||
mActivityThread = activityThread;
|
||||
mApplicationInfo = new ApplicationInfo();
|
||||
mApplicationInfo = info != null ? info : new ApplicationInfo();
|
||||
mApplicationInfo.packageName = name;
|
||||
mPackageName = name;
|
||||
mAppDir = null;
|
||||
@@ -2202,7 +2202,7 @@ public final class ActivityThread {
|
||||
if (mSystemContext == null) {
|
||||
ApplicationContext context =
|
||||
ApplicationContext.createSystemContext(this);
|
||||
PackageInfo info = new PackageInfo(this, "android", context);
|
||||
PackageInfo info = new PackageInfo(this, "android", context, null);
|
||||
context.init(info, null, this);
|
||||
context.getResources().updateConfiguration(
|
||||
getConfiguration(), getDisplayMetricsLocked(false));
|
||||
@@ -2214,6 +2214,13 @@ public final class ActivityThread {
|
||||
return mSystemContext;
|
||||
}
|
||||
|
||||
public void installSystemApplicationInfo(ApplicationInfo info) {
|
||||
synchronized (this) {
|
||||
ApplicationContext context = getSystemContext();
|
||||
context.init(new PackageInfo(this, "android", context, info), null, this);
|
||||
}
|
||||
}
|
||||
|
||||
void scheduleGcIdler() {
|
||||
if (!mGcIdlerScheduled) {
|
||||
mGcIdlerScheduled = true;
|
||||
|
||||
@@ -1221,6 +1221,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
ApplicationInfo info =
|
||||
mSelf.mContext.getPackageManager().getApplicationInfo(
|
||||
"android", STOCK_PM_FLAGS);
|
||||
mSystemThread.installSystemApplicationInfo(info);
|
||||
|
||||
synchronized (mSelf) {
|
||||
ProcessRecord app = mSelf.newProcessRecordLocked(
|
||||
mSystemThread.getApplicationThread(), info,
|
||||
|
||||
Reference in New Issue
Block a user