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

Commit c2283594 authored by Clark Scheff's avatar Clark Scheff Committed by Steve Kondik
Browse files

Themes: Update LoadedApk resources.

Ported from cm-11.0 with lazy loading of resources

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