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

Commit 830d4e17 authored by Yurii Zubrytskyi's avatar Yurii Zubrytskyi
Browse files

[res] Load as little of ApkAssets as possible

When only checking if an APK has the overlayable definition,
don't parse its whole resources table

Bug: 282215580
Test: build + boot
Change-Id: I3ac5468848a5d400aaa343601b7157bc3c572c44
parent b96b82bb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1344,7 +1344,8 @@ public final class OverlayManagerService extends SystemService {

            ApkAssets apkAssets = null;
            try {
                apkAssets = ApkAssets.loadFromPath(pkg.getSplits().get(0).getPath());
                apkAssets = ApkAssets.loadFromPath(pkg.getSplits().get(0).getPath(),
                        ApkAssets.PROPERTY_ONLY_OVERLAYABLES);
                return apkAssets.definesOverlayable();
            } finally {
                if (apkAssets != null) {