Merge "Check if IncFs supports fs-verity before trying to enable it." into sc-dev

This commit is contained in:
Alex Buynytskyy
2021-03-05 21:39:26 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 0 deletions

View File

@@ -58,6 +58,8 @@ public final class IncrementalManager {
private static final String ALLOWED_PROPERTY = "incremental.allowed";
public static final int MIN_VERSION_TO_SUPPORT_FSVERITY = 2;
public static final int CREATE_MODE_TEMPORARY_BIND =
IIncrementalService.CREATE_MODE_TEMPORARY_BIND;
public static final int CREATE_MODE_PERMANENT_BIND =

View File

@@ -20368,6 +20368,11 @@ public class PackageManagerService extends IPackageManager.Stub
return;
}
if (isIncrementalPath(pkg.getPath()) && IncrementalManager.getVersion()
< IncrementalManager.MIN_VERSION_TO_SUPPORT_FSVERITY) {
return;
}
// Collect files we care for fs-verity setup.
ArrayMap<String, String> fsverityCandidates = new ArrayMap<>();
if (legacyMode) {