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

* commit '87353093ef98f13c45c418884734460a1b09c149':
  Measure ASECs for forward-locked apps
This commit is contained in:
Kenny Root
2012-06-07 16:34:32 -07:00
committed by Android Git Automerger

View File

@@ -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;
}