Loading core/java/android/content/pm/PackageParser.java +8 −2 Original line number Diff line number Diff line Loading @@ -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); } Loading Loading @@ -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); } Loading services/core/java/com/android/server/pm/PackageManagerService.java +78 −76 File changed.Preview size limit exceeded, changes collapsed. Show changes services/core/java/com/android/server/pm/PackageManagerServiceUtils.java +12 −11 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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 Loading services/core/java/com/android/server/pm/Settings.java +2 −3 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
core/java/android/content/pm/PackageParser.java +8 −2 Original line number Diff line number Diff line Loading @@ -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); } Loading Loading @@ -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); } Loading
services/core/java/com/android/server/pm/PackageManagerService.java +78 −76 File changed.Preview size limit exceeded, changes collapsed. Show changes
services/core/java/com/android/server/pm/PackageManagerServiceUtils.java +12 −11 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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 Loading
services/core/java/com/android/server/pm/Settings.java +2 −3 Original line number Diff line number Diff line Loading @@ -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); Loading