Skip to content

Commit 8735309

Browse files
krutonAndroid (Google) Code Review
authored andcommitted
Merge "Measure ASECs for forward-locked apps" into jb-dev
2 parents 0e0ce11 + 2afded1 commit 8735309

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

services/java/com/android/server/pm/PackageManagerService.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7843,7 +7843,7 @@ private boolean getPackageSizeInfoLI(String packageName, PackageStats pStats) {
78437843
}
78447844
p = ps.pkg;
78457845
}
7846-
if (p != null && isExternal(p)) {
7846+
if (p != null && (isExternal(p) || isForwardLocked(p))) {
78477847
String secureContainerId = cidFromCodePath(p.applicationInfo.sourceDir);
78487848
if (secureContainerId != null) {
78497849
asecPath = PackageHelper.getSdFilesystem(secureContainerId);
@@ -7866,6 +7866,13 @@ private boolean getPackageSizeInfoLI(String packageName, PackageStats pStats) {
78667866
if (res < 0) {
78677867
return false;
78687868
}
7869+
7870+
// Fix-up for forward-locked applications in ASEC containers.
7871+
if (!isExternal(p)) {
7872+
pStats.codeSize += pStats.externalCodeSize;
7873+
pStats.externalCodeSize = 0L;
7874+
}
7875+
78697876
return true;
78707877
}
78717878

0 commit comments

Comments
 (0)