Check if IncFs supports fs-verity before trying to enable it.
Bug: 181242243 Test: atest ApkVerityInstallTest Change-Id: I70225bb8a231cd4c0a7236cb0d845d5c65046ebc
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user