Loading core/java/android/content/pm/flags.aconfig +9 −1 Original line number Diff line number Diff line Loading @@ -349,3 +349,11 @@ flag { purpose: PURPOSE_BUGFIX } } flag { name: "alternative_for_dexopt_cleanup" namespace: "art_cloud" description: "Flag guarding the alternative code path replacing the legacy dexopt code, to allow legacy dexopt cleanup." bug: "258223472" is_fixed_read_only: true } core/java/com/android/internal/content/InstallLocationUtils.java +26 −7 Original line number Diff line number Diff line Loading @@ -47,6 +47,10 @@ import libcore.io.IoUtils; import java.io.File; import java.io.FileDescriptor; import java.io.IOException; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Objects; import java.util.UUID; Loading Loading @@ -445,6 +449,20 @@ public class InstallLocationUtils { String abiOverride) throws IOException { long sizeBytes = 0; if (android.content.pm.Flags.alternativeForDexoptCleanup()) { Path path = pkg.getPath() != null ? Paths.get(pkg.getPath()) : null; if (path == null || !Files.isDirectory(path)) { // monolithic sizeBytes += Files.size(Paths.get(pkg.getBaseApkPath())); } else { // cluster try (DirectoryStream<Path> stream = Files.newDirectoryStream(path)) { for (Path child : stream) { if (!Files.isDirectory(child)) { sizeBytes += Files.size(child); } } } } } else { // Include raw APKs, and possibly unpacked resources for (String codePath : pkg.getAllApkPaths()) { final File codeFile = new File(codePath); Loading @@ -453,6 +471,7 @@ public class InstallLocationUtils { // Include raw dex metadata files sizeBytes += DexMetadataHelper.getPackageDexMetadataSize(pkg); } if (pkg.isExtractNativeLibs()) { // Include all relevant native code Loading Loading
core/java/android/content/pm/flags.aconfig +9 −1 Original line number Diff line number Diff line Loading @@ -349,3 +349,11 @@ flag { purpose: PURPOSE_BUGFIX } } flag { name: "alternative_for_dexopt_cleanup" namespace: "art_cloud" description: "Flag guarding the alternative code path replacing the legacy dexopt code, to allow legacy dexopt cleanup." bug: "258223472" is_fixed_read_only: true }
core/java/com/android/internal/content/InstallLocationUtils.java +26 −7 Original line number Diff line number Diff line Loading @@ -47,6 +47,10 @@ import libcore.io.IoUtils; import java.io.File; import java.io.FileDescriptor; import java.io.IOException; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Objects; import java.util.UUID; Loading Loading @@ -445,6 +449,20 @@ public class InstallLocationUtils { String abiOverride) throws IOException { long sizeBytes = 0; if (android.content.pm.Flags.alternativeForDexoptCleanup()) { Path path = pkg.getPath() != null ? Paths.get(pkg.getPath()) : null; if (path == null || !Files.isDirectory(path)) { // monolithic sizeBytes += Files.size(Paths.get(pkg.getBaseApkPath())); } else { // cluster try (DirectoryStream<Path> stream = Files.newDirectoryStream(path)) { for (Path child : stream) { if (!Files.isDirectory(child)) { sizeBytes += Files.size(child); } } } } } else { // Include raw APKs, and possibly unpacked resources for (String codePath : pkg.getAllApkPaths()) { final File codeFile = new File(codePath); Loading @@ -453,6 +471,7 @@ public class InstallLocationUtils { // Include raw dex metadata files sizeBytes += DexMetadataHelper.getPackageDexMetadataSize(pkg); } if (pkg.isExtractNativeLibs()) { // Include all relevant native code Loading