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

Commit c26f4c56 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove scanFile argument"

parents 4916b293 ddaaf4cf
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1258,9 +1258,12 @@ public class PackageParser {
                }
            }

            pkg.setCodePath(packageDir.getAbsolutePath());
            pkg.setCodePath(packageDir.getCanonicalPath());
            pkg.setUse32bitAbi(lite.use32bitAbi);
            return pkg;
        } catch (IOException e) {
            throw new PackageParserException(INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION,
                    "Failed to get path: " + lite.baseCodePath, e);
        } finally {
            IoUtils.closeQuietly(assetLoader);
        }
@@ -1289,9 +1292,12 @@ public class PackageParser {

        try {
            final Package pkg = parseBaseApk(apkFile, assets, flags);
            pkg.setCodePath(apkFile.getAbsolutePath());
            pkg.setCodePath(apkFile.getCanonicalPath());
            pkg.setUse32bitAbi(lite.use32bitAbi);
            return pkg;
        } catch (IOException e) {
            throw new PackageParserException(INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION,
                    "Failed to get path: " + apkFile, e);
        } finally {
            IoUtils.closeQuietly(assets);
        }
+78 −76

File changed.

Preview size limit exceeded, changes collapsed.

+12 −11
Original line number Diff line number Diff line
@@ -295,8 +295,11 @@ public class PackageManagerServiceUtils {
        return false;
    }

    public static long getLastModifiedTime(PackageParser.Package pkg, File srcFile) {
        if (srcFile.isDirectory()) {
    public static long getLastModifiedTime(PackageParser.Package pkg) {
        final File srcFile = new File(pkg.codePath);
        if (!srcFile.isDirectory()) {
            return srcFile.lastModified();
        }
        final File baseFile = new File(pkg.baseCodePath);
        long maxModifiedTime = baseFile.lastModified();
        if (pkg.splitCodePaths != null) {
@@ -307,8 +310,6 @@ public class PackageManagerServiceUtils {
        }
        return maxModifiedTime;
    }
        return srcFile.lastModified();
    }

    /**
     * Checks that the archive located at {@code fileName} has uncompressed dex file and so
+2 −3
Original line number Diff line number Diff line
@@ -3572,11 +3572,10 @@ public final class Settings {
        int pkgFlags = 0;
        int pkgPrivateFlags = 0;
        pkgFlags |= ApplicationInfo.FLAG_SYSTEM;
        final File codePathFile = new File(codePathStr);
        if (PackageManagerService.locationIsPrivileged(codePathFile)) {
        if (PackageManagerService.locationIsPrivileged(codePathStr)) {
            pkgPrivateFlags |= ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
        }
        PackageSetting ps = new PackageSetting(name, realName, codePathFile,
        PackageSetting ps = new PackageSetting(name, realName, new File(codePathStr),
                new File(resourcePathStr), legacyNativeLibraryPathStr, primaryCpuAbiStr,
                secondaryCpuAbiStr, cpuAbiOverrideStr, versionCode, pkgFlags, pkgPrivateFlags,
                parentPackageName, null /*childPackageNames*/, 0 /*sharedUserId*/, null, null);