Merge \\\"Revert \\\"Parse \\\"vendor/priv-app\\\" to find privileged applications\\\"\\\" into nyc-dev am: c211539769 am: fc11796506
am: 923e10da7b
Change-Id: Ia091e17be1738a0741c672cc9fcfcd6e3205d167
This commit is contained in:
@@ -2453,14 +2453,8 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
| PackageParser.PARSE_IS_SYSTEM
|
||||
| PackageParser.PARSE_IS_SYSTEM_DIR, scanFlags, 0);
|
||||
|
||||
// Collected privileged vendor packages.
|
||||
final File privilegedVendorAppDir = new File(Environment.getVendorDirectory(), "priv-app");
|
||||
scanDirLI(privilegedVendorAppDir, PackageParser.PARSE_IS_SYSTEM
|
||||
| PackageParser.PARSE_IS_SYSTEM_DIR
|
||||
| PackageParser.PARSE_IS_PRIVILEGED, scanFlags, 0);
|
||||
|
||||
// Collect all vendor packages.
|
||||
File vendorAppDir = new File(Environment.getVendorDirectory(), "app");
|
||||
File vendorAppDir = new File("/vendor/app");
|
||||
try {
|
||||
vendorAppDir = vendorAppDir.getCanonicalFile();
|
||||
} catch (IOException e) {
|
||||
@@ -15827,10 +15821,7 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
try {
|
||||
final String privilegedAppDir = new File(Environment.getRootDirectory(), "priv-app")
|
||||
.getCanonicalPath();
|
||||
final String privilegedAppVendorDir = new File(Environment.getVendorDirectory(), "priv-app")
|
||||
.getCanonicalPath();
|
||||
return (path.getCanonicalPath().startsWith(privilegedAppDir)
|
||||
|| path.getCanonicalPath().startsWith(privilegedAppVendorDir));
|
||||
return path.getCanonicalPath().startsWith(privilegedAppDir);
|
||||
} catch (IOException e) {
|
||||
Slog.e(TAG, "Unable to access code path " + path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user