Restore the check of fs-verity status
IncFs v1 does not support fs-verity. The original condition before
ag/20327155 allowed a split to be installed without .fsv_sig, but ag/
ag/20327155 changes the expectation. To maintain the behavior, still
check the fs-verity-ness in addition.
Bug: 257775576
Test: abtd
Change-Id: If0a87b2ef4ad2e4c4920dbd17d1591b021f470d1
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index 2ee12bf..028bb24 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -2782,6 +2782,7 @@
// Default to require only if existing base apk has fs-verity signature.
mVerityFoundForApks = PackageManagerServiceUtils.isApkVerityEnabled()
&& params.mode == SessionParams.MODE_INHERIT_EXISTING
+ && VerityUtils.hasFsverity(pkgInfo.applicationInfo.getBaseCodePath())
&& (new File(VerityUtils.getFsveritySignatureFilePath(
pkgInfo.applicationInfo.getBaseCodePath()))).exists();