From 6807d2dd39163b6789f0cbfea392a82a0f0da413 Mon Sep 17 00:00:00 2001 From: Yuyang Huang Date: Mon, 12 May 2025 22:21:58 +0900 Subject: [PATCH] Enforce valid APF versions (0, 2, 3, 4, 6000, 6100) This commit adds a check to enforce that reported APF versions are either 0 (indicating no support) or one of the officially valid versions: 2, 3, 4, 6000 or 6100. This ensures consistency and prevents issues arising from device using unsupported APF versions. Test: TH Flag: EXEMPT bugfix Change-Id: Icdefa89fae590ec78146df4cbd2c683b5d8258f7 --- tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt index b4ad325445..3211725314 100644 --- a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt +++ b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt @@ -405,6 +405,8 @@ class ApfIntegrationTest { ) @Test fun testApfCapabilities() { + // If APF is supported, the version must be valid. + assertThat(caps.apfVersionSupported).isAnyOf(0, 2, 3, 4, 6000, 6100) // APF became mandatory in Android 14 VSR. val vsrApiLevel = getVsrApiLevel() assume().that(vsrApiLevel).isAtLeast(34)