Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdf53a46 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

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.
parents 80d8ace4 432b713c
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -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;
+2 −0
Original line number Diff line number Diff line
@@ -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,