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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user