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
This commit is contained in:
Victor Hsieh
2022-11-28 14:06:10 -08:00
parent c2665dd82f
commit 2ee62d082a

View File

@@ -2782,6 +2782,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
// 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();