Merge "Skip APF multidevice CTS if device support automotive feature" into main
This commit is contained in:
commit
a17b23df03
2 changed files with 9 additions and 0 deletions
|
|
@ -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 = (
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue