diff --git a/staticlibs/testutils/host/python/apf_test_base.py b/staticlibs/testutils/host/python/apf_test_base.py index f77dd42603..b0fe28fdf3 100644 --- a/staticlibs/testutils/host/python/apf_test_base.py +++ b/staticlibs/testutils/host/python/apf_test_base.py @@ -39,6 +39,11 @@ class ApfTestBase(multi_devices_test_base.MultiDevicesTestBase): 'NetworkStack is too old to support send raw packet, skip test.', ) + asserts.abort_class_if( + self.client.hasAutomotiveFeature(), + 'APF GMS-VSR requirements do not apply to automotive devices, skip' + ' test.', + ) # Fetch device properties and storing them locally for later use. # TODO: refactor to separate instances to store client and server device self.server_iface_name, client_network = ( diff --git a/tests/cts/multidevices/snippet/ConnectivityMultiDevicesSnippet.kt b/tests/cts/multidevices/snippet/ConnectivityMultiDevicesSnippet.kt index 3f3a6d34f0..feea1247fd 100644 --- a/tests/cts/multidevices/snippet/ConnectivityMultiDevicesSnippet.kt +++ b/tests/cts/multidevices/snippet/ConnectivityMultiDevicesSnippet.kt @@ -18,6 +18,7 @@ package com.google.snippet.connectivity import android.Manifest.permission.NETWORK_SETTINGS import android.Manifest.permission.OVERRIDE_WIFI_CONFIG +import android.content.pm.PackageManager.FEATURE_AUTOMOTIVE import android.content.pm.PackageManager.FEATURE_TELEPHONY import android.content.pm.PackageManager.FEATURE_WIFI import android.net.ConnectivityManager @@ -81,6 +82,9 @@ class ConnectivityMultiDevicesSnippet : Snippet { @Rpc(description = "Check whether the device has telephony feature.") fun hasTelephonyFeature() = pm.hasSystemFeature(FEATURE_TELEPHONY) + @Rpc(description = "Check whether the device has automotive feature.") + fun hasAutomotiveFeature() = pm.hasSystemFeature(FEATURE_AUTOMOTIVE) + @Rpc(description = "Check whether the device supporters AP + STA concurrency.") fun isStaApConcurrencySupported() = wifiManager.isStaApConcurrencySupported()