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

Commit 87353093 authored by Kenny Root's avatar Kenny Root Committed by Android (Google) Code Review
Browse files

Merge "Measure ASECs for forward-locked apps" into jb-dev

parents 0e0ce11e 2afded11
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -7843,7 +7843,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);
@@ -7866,6 +7866,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;
    }