Only run v4 tests if incremental is enabled on a device
v4 signature is only supported for incremental installations,
add a missing check for one of test cases
Bug: 195580880
Test: atest PkgInstallSignatureVerificationTest
Change-Id: I010271e6efd17337522f3a4b47a30b7e11b5081e
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/PkgInstallSignatureVerificationTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/PkgInstallSignatureVerificationTest.java
index 4f04933..4374efe 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/PkgInstallSignatureVerificationTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/PkgInstallSignatureVerificationTest.java
@@ -1321,6 +1321,11 @@
}
public void testInstallV4UpdateAfterRotation() throws Exception {
+ // V4 is only enabled on devices with Incremental feature
+ if (!hasIncrementalFeature()) {
+ return;
+ }
+
// This test performs an end to end verification of the update of an app with a rotated
// key. The app under test exports a bound service that performs its own PackageManager key
// rotation API verification, and the instrumentation test binds to the service and invokes