From 2ab792786a4db333673fc7330f0e87fb704a898d Mon Sep 17 00:00:00 2001 From: Paul Hu Date: Wed, 24 Apr 2024 05:49:42 +0000 Subject: [PATCH] Fix test_hotspot_upstream_wifi not running consistently The isStaApConcurrencySupported() returns Unit instead of a boolean value, which is interpreted as a falsy value when called from the host in Python. This will cause the Wi-Fi AP + STA concurrency check to always be skipped and preventing the test_hotspot_upstream_wifi test from running. This incorrect logic should be fixed to ensure it accurately reflects the device's capabilities. Test: atest CtsConnectivityMultiDevicesTestCases Change-Id: I4cde38eff43e254450c53d5d3e3aac4027b80e0d --- .../multidevices/snippet/ConnectivityMultiDevicesSnippet.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/cts/multidevices/snippet/ConnectivityMultiDevicesSnippet.kt b/tests/cts/multidevices/snippet/ConnectivityMultiDevicesSnippet.kt index c883b7803b..258648f6b1 100644 --- a/tests/cts/multidevices/snippet/ConnectivityMultiDevicesSnippet.kt +++ b/tests/cts/multidevices/snippet/ConnectivityMultiDevicesSnippet.kt @@ -64,9 +64,7 @@ class ConnectivityMultiDevicesSnippet : Snippet { fun hasTelephonyFeature() = pm.hasSystemFeature(FEATURE_TELEPHONY) @Rpc(description = "Check whether the device supporters AP + STA concurrency.") - fun isStaApConcurrencySupported() { - wifiManager.isStaApConcurrencySupported() - } + fun isStaApConcurrencySupported() = wifiManager.isStaApConcurrencySupported() @Rpc(description = "Request cellular connection and ensure it is the default network.") fun requestCellularAndEnsureDefault() {