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

Commit 6c3131a1 authored by Clark Scheff's avatar Clark Scheff
Browse files

Themes: Update LoadedApk resources.

Ported from cm-11.0 with lazy loading of resources

Change-Id: I324eb5ebc106a531afc4b44ea5d32f272250f6a8
parent 81f1abbd
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1744,8 +1744,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
@@ -1763,6 +1762,10 @@ public final class ActivityThread {
                            new WeakReference<LoadedApk>(packageInfo));
                }
            }
            if (packageInfo.mResources != null
                    && !packageInfo.mResources.getAssets().isUpToDate()) {
                packageInfo.mResources = null;
            }
            return packageInfo;
        }
    }