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

Commit 8fff544e authored by Clark Scheff's avatar Clark Scheff
Browse files

Themes: Update LoadedApk resources.

Instead of creating a new LoadedApk when resources are not up to
date, we use the existing LoadedApk but recreate mResources.

Change-Id: Ic1ad810863d03c2cedc751c9e84dd7c954daf3d7
parent 012d3db5
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1656,8 +1656,7 @@ public final class ActivityThread {
                ref = mResourcePackages.get(aInfo.packageName);
            }
            LoadedApk packageInfo = ref != null ? ref.get() : null;
            if (packageInfo == null || (packageInfo.mResources != null
                    && !packageInfo.mResources.getAssets().isUpToDate())) {
            if (packageInfo == null) {
                if (localLOGV) Slog.v(TAG, (includeCode ? "Loading code package "
                        : "Loading resource-only package ") + aInfo.packageName
                        + " (in " + (mBoundApplication != null
@@ -1675,6 +1674,11 @@ public final class ActivityThread {
                            new WeakReference<LoadedApk>(packageInfo));
                }
            }
            if (packageInfo.mResources == null
                    || !packageInfo.mResources.getAssets().isUpToDate()) {
                packageInfo.mResources = null;
                packageInfo.getResources(this);
            }
            return packageInfo;
        }
    }