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

Commit 2afded11 authored by Kenny Root's avatar Kenny Root
Browse files

Measure ASECs for forward-locked apps

Forward-locked apps are mostly in ASEC containers now, so the
containers need to be measured as well.

Bug: 6606390
Change-Id: I69e9fe47aabe1e130568779a45fe8000b3ce9d4c
parent b7161f57
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -7839,7 +7839,7 @@ public class PackageManagerService extends IPackageManager.Stub {
                }
                p = ps.pkg;
            }
            if (p != null && isExternal(p)) {
            if (p != null && (isExternal(p) || isForwardLocked(p))) {
                String secureContainerId = cidFromCodePath(p.applicationInfo.sourceDir);
                if (secureContainerId != null) {
                    asecPath = PackageHelper.getSdFilesystem(secureContainerId);
@@ -7862,6 +7862,13 @@ public class PackageManagerService extends IPackageManager.Stub {
        if (res < 0) {
            return false;
        }

        // Fix-up for forward-locked applications in ASEC containers.
        if (!isExternal(p)) {
            pStats.codeSize += pStats.externalCodeSize;
            pStats.externalCodeSize = 0L;
        }

        return true;
    }